Database Connections Flashcards
mysql::$client_info
string $mysqli->client_info;
Returns a string that represents the MySQL client library version.
mysqli::$affected_rows
OOP Style
int $mysqli->affected_rows;
Returns the number of rows affected by the last INSERT, UPDATE, REPLACE, or DELETE query.
For SELECT statements mysqli_affected_rows() works like mysqli_num_rows()
mysqli::$client_version
int $mysqli->client_version;
Returns client version number as an integer.
mysqli::$connect_errno
string $mysqli->connect_errno;
Returns the last error code number from the last call to mysqli_connect();
mysqli::$connect_error
string $mysqli->connect_error;
Returns the last error message string from the last call to mysqli_connect();
mysqli::$errno
int $mysqli->errno;
Returns the last error code for the most recent MySQLi function call that can succeed or fail.
mysqli::$error_list
array $mysqli->error_list;
Returns an array of errors for the most recent MySQLi function call that can succeed or fail.
mysqli::$error
string $mysql->error;
Returns the last error message for the most recent MySQLi function call that can succeed or fail.
mysqli::$field_count
int $mysqli->field_count;
Returns number of columns for the most recent query on the connection represented by the “link” parameter. This function can be useful when using the mysqli_store_result() function to determine if the query should have produced a non-empty result set or not without knowing the nature of the query;
mysql::$host_info
string $mysqli->host_info;
Returns a string describing the connection represented by the “link” parameter (including the server host name).
mysqli::$protocol_version
string $mysqli->protocol_version;
Returns an integer representing the MySQLi protocol version used by the connection represented by the “link” parameter.
mysqli::$server_info
string $mysqli->server_info;
Returns a string representing the version of the MySQL server that the MySQLi extension is connected to.
mysqli_version
int $mysqli->server_version
Returns the version of the server connected to (represented by the “link” parameter) as an integer.
mysqli::$info
string $mysqli->info;
Returns a string providing information about the last query executed.
mysqli::$insert_id
mixed $mysqli->insert_id;
Returns the ID generated by a query on a table with a column having the AUTO_INCREMENT attribute. If the Kat query wasn’t an INSERT or UPDATE statement or if the modified table does not have a column with the AUTO_INCREMENT attribute, this function will return zero.