MySQLi – Useful Functions
Here is the list of all important MySQLi functions. Each function has been explained along with suitable example.
-
− It used to get the information about number of affected rows in a previous MySQL operation
-
− It used to turn on or off auto-committing database modifications operation
-
− It used to start a transaction
-
− It used to change the user of the specified database connection
-
– It returns the default character set for the database connection.
-
− It is used to get MySQL client info.
-
− It returns the MySQL client version as a string.
-
− It closes a previously opened database connection.
-
− It commits the current transaction.
-
− It returns the error code from last connect call.
-
− It returns a string description of the last connect error.
-
− It used to open a new connection to the MySQL server
-
− It used to performs debugging operations
-
− It is used to dump debugging information into the log
-
− It returns the error code for the most recent function call
-
− It returns a list of errors from the last command executed
-
− It returns a string description of the last error
-
− It returns the number of columns for the most recent query
-
− It returns a character set object
-
− It is used to get MySQL client info
-
− It returns client per-process statistics
-
− It returns the MySQL client version as an integer
-
− It returns statistics about the client connection
-
− It returns a string representing the type of connection used
-
− It returns the version of the MySQL protocol used
-
− It returns the version of the MySQL server
-
− It returns the version of the MySQL server as an integer
-
− It is used to get result of SHOW WARNINGS
-
− It retrieves information about the most recently executed query
-
− It returns the auto generated id used in the latest query
-
− It asks the server to kill a MySQL thread
-
− It used to check if there are any more query results from a multi query
-
− It performs a query on the database
-
− It prepares next result from multi_query
-
− It used to set options
-
− It is used to ping a server
-
− It used to poll connections
-
− It used to prepare an SQL statement for execution.
-
− It is used to perform a query on the database.
-
− It opens a connection to a mysql server.
-
− It escapes special characters in a string for use in an SQL statement
-
− It is used to execute an SQL query.
-
− It is used to get result from async query
-
− It used to refresh an SQL statement for execution.
-
− It removes the named savepoint from the set of savepoints of the current transaction
-
− It rolls back current transaction
-
− It returns RPL query type
-
− It is used to selects the default database for database queries
-
− It is used to send the query and return
-
− It sets the default client character set
-
− It is used to unsets user defined handler for load local infile command
-
− It is used to set callback function for LOAD DATA LOCAL INFILE command
-
− It returns the SQLSTATE error from previous MySQL operation.
-
− It is used for establishing secure connections using SSL
-
− It is used to set callback function for LOAD DATA LOCAL INFILE command
-
− It is used to initialize a statement and returns an object for use with mysqli_stmt_prepare.
-
− It returns the thread ID for the current connection
-
− It returns whether thread safety is given or not.
-
− It is used to initiate a result set retrieval
-
− It returns the number of warnings from the last query for the given link