PHP MYSQL Functions

PHP Math Functions
PHP Output Functions

On this page, you will find all the methods available in PHP to interact with the database like MySQL.

To install MySQLi in PHP, click on this link http://php.net/manual/en/mysqli.installation.php

For runtime configurations of MySQLi click thie link  http://php.net/manual/en/mysqli.configuration.php

MySQLi extension comes with PHP v5.0

FunctionDescription
affected_rows()Returns the number of affected rows in the previous MySQL operation
autocommit()Turn on or off auto-committing database modifications
begin_transaction()Starts a transaction
change_user()Change the user of the specified database connection
character_set_name()Returns the default character set for the database connection
close()Close a previously opened database connection
commit()Commit the current transaction
connect()Open a new connection to the MySQL server
connect_errno()Returns the error code from the last connection error
connect_error()Returns the error description from the last connection error
data_seek()Adjust the result pointer to an arbitrary row in the result-set
debug()Perform debugging operations
dump_debug_info()Dump debugging info into the log
errno()Returns the last error code for the most recent function call
error()Returns the last error description for the most recent function call
error_list()Returns a list of errors for the most recent function call
fetch_all()Fetch all result rows as an associative array, a numeric array, or both
fetch_array()Fetch a result row as an associative, a numeric array, or both
fetch_assoc()Fetch a result row as an associative array
fetch_field()Returns the next field in the result-set, as an object
fetch_field_direct()Returns meta-data for a single field in the result-set, as an object
fetch_fields()Returns an array of objects that represent the fields in a result-set
fetch_lengths()Returns the lengths of the columns of the current row in the result-set
fetch_object()Returns the current row of a result-set, as an object
fetch_row()Fetch one row from a result-set and Get it as an enumerated array
field_count()Returns the number of columns for the most recent query
field_seek()Set the field cursor to the given field offset
get_charset()Returns a character set object
get_client_info()Returns the MySQL client library version
get_client_stats()Returns statistics about client per-process
get_client_version()Returns the MySQL client library version as an integer
get_connection_stats()Returns statistics about the client connection
get_host_info()Returns the MySQL server hostname and the connection type
get_proto_info()Returns the MySQL protocol version
get_server_info()Returns the MySQL server version
get_server_version()Returns the MySQL server version as an integer
info()Returns information about the last executed query
init()Initialize MySQLi and Get a resource for use with real_connect()
insert_id()Returns the auto-generated id from the last query
kill()Ask the server to kill a MySQL thread
more_results()Check if there are more results from a multi-query
multi_query()Perform one or more queries on the database
next_result()Prepare the next result-set from multi_query()
options()Set extra connect options and affect behavior for a connection
ping()Ping a server connection, or tries to reconnect if the connection has gone down
poll()Poll connections
prepare()Prepare an SQL statement for execution
query()Perform a query against a database
real_connect()Open a new connection to the MySQL server
real_escape_string()Escape special characters in a string for use in an SQL statement
real_query()Execute a single SQL query
reap_async_query()Returns result from an async SQL query
refresh()Refresh/flushe tables or caches, or resets the replication server information
rollback()Roll back the current transaction for the database
select_db()Select the default database for database queries
set_charset()Set the default client character set
set_local_infile_default()Unsets user defined handler for load local infile command
set_local_infile_handler()Set callback function for LOAD DATA LOCAL INFILE command
sqlstate()Returns the SQLSTATE error code for the error
ssl_set()Used to establish secure connections using SSL
stat()Returns the current system status
stmt_init()Initialize a statement and Get an object for use with stmt_prepare()
store_result()Transfer a result-set from the last query
thread_id()Returns the thread ID for the current connection
thread_safe()Returns whether the client library is compiled as thread-safe
use_result()Initiate the retrieval of a result-set from the last query executed
warning_count()Returns the number of warnings from the last query in the connection
MySQL functions in PHP

PHP Math Functions
PHP Output Functions
en English
X
Scroll to Top