PHP Modules Tutorials - Herong's Tutorial Examples
∟MySQLi Module - Accessing MySQL Server
∟Summary of Basic MySQLi Functions
This section provides a summary of basic functions provided by the MySQLi module.
Here is a summary of some MySQLi basic functions.
- mysqli_connect() -
Creates a connection to a MySQL server with given host, user name
and password parameters.
- mysqli_connect_error() -
Returns the error message of the last mysqli_connect() call.
- mysqli_connect_errno() -
Returns the error number of the last mysqli_connect() call.
- mysqli_close() -
Closes a given MySQL connection.
- mysqli_get_server_info() -
Returns information about the MySQL server.
- mysqli_query() -
Sends a MySQL query to the server, and returns a result set object.
- mysqli_errno() -
Returns the error code from the last mysqli_query() call.
- mysqli_error() -
Returns the error message from the last mysqli_query() call.
- mysqli_affected_rows() -
Returns the number of effected rows of the last
INSERT, UPDATE, REPLACE or DELETE query.
- mysqli_insert_id() -
Returns the first AUTO_INCREMENT value of the last INSERT query.
- mysqli_num_rows() -
Returns the number of rows of a given result set.
- mysqli_fetch_array() -
Fetches the next row from a given result set,
and returns the row as an array indexed by both column positions and names.
- mysqli_fetch_row() -
Fetches the next row from a given result set,
and returns the row as an array indexed by column positions only.
- mysqli_fetch_assoc() -
Fetches a row from a given result set, and returns the row
as an array indexed by column names (associative array) only.
- mysqli_fetch_fields() -
Fetches field information from a given result set,
and returns as an array of objects with field name and other information.
- mysqli_free_result() -
Frees a given result set.
- mysqli_real_escape_string() -
Prepare a given string for use in a query by escaping special characters.
- mysqli_get_connection_stats() -
Returns statistics of a given connection.
- mysqli_begin_transaction() -
Starts a new transaction to run queries without committing.
- mysqli_commit() -
Commits all changes performed in the current transaction.
- mysqli_rollback() -
Rolls back all changed performed in the current transaction.
- mysqli_get_warnings() -
Returns warnings from the last mysqli_query() call as a linked list.
Table of Contents
About This Book
Introduction and Installation of PHP
Managing PHP Environment and Modules on macOS
Managing PHP Environment and Modules on CentOS
Configuration and Modules
cURL Module - Client for URL
DOM Module - Parsing HTML Documents
GD Module - Manipulating Images and Pictures
►MySQLi Module - Accessing MySQL Server
MySQLi Module and Configuration
mysqli-hello.php - Test MySQLi Module
mysqli_connect() - Open MySQL Connection
mysqli_query() - Run SQL Queries
mysqli_affected_rows() - Count Affected Rows
mysqli_insert_id() - ID from AUTO_INCREMENT
mysqli_fetch_array() - Fetch Row from Query Result
mysqli_fetch_fields() - Fetch Field Information
Escape Escape Characters - \\\\ for \\
►Summary of Basic MySQLi Functions
MySQLi Object-Oriented Programming
OpenSSL Module - Cryptography and SSL/TLS Toolkit
PCRE Module - Perl Compatible Regular Expressions
SOAP Module - Creating and Calling Web Services
SOAP Module - Server Functions and Examples
Zip Module - Managing ZIP Archive Files
References
Index
Full Version in PDF/EPUB