Database Connections Flashcards

0
Q

mysql::$client_info

string $mysqli->client_info;

A

Returns a string that represents the MySQL client library version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

mysqli::$affected_rows

OOP Style
int $mysqli->affected_rows;

A

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()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

mysqli::$client_version

int $mysqli->client_version;

A

Returns client version number as an integer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

mysqli::$connect_errno

string $mysqli->connect_errno;

A

Returns the last error code number from the last call to mysqli_connect();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

mysqli::$connect_error

string $mysqli->connect_error;

A

Returns the last error message string from the last call to mysqli_connect();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

mysqli::$errno

int $mysqli->errno;

A

Returns the last error code for the most recent MySQLi function call that can succeed or fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

mysqli::$error_list

array $mysqli->error_list;

A

Returns an array of errors for the most recent MySQLi function call that can succeed or fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

mysqli::$error

string $mysql->error;

A

Returns the last error message for the most recent MySQLi function call that can succeed or fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

mysqli::$field_count

int $mysqli->field_count;

A

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;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

mysql::$host_info

string $mysqli->host_info;

A

Returns a string describing the connection represented by the “link” parameter (including the server host name).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

mysqli::$protocol_version

string $mysqli->protocol_version;

A

Returns an integer representing the MySQLi protocol version used by the connection represented by the “link” parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

mysqli::$server_info

string $mysqli->server_info;

A

Returns a string representing the version of the MySQL server that the MySQLi extension is connected to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

mysqli_version

int $mysqli->server_version

A

Returns the version of the server connected to (represented by the “link” parameter) as an integer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

mysqli::$info

string $mysqli->info;

A

Returns a string providing information about the last query executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

mysqli::$insert_id

mixed $mysqli->insert_id;

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

mysqli::$sqlstate

string $mysqli->sqlstate;

A

Returns a string containing the SQLSTATE error code for the last error. The error code consists of five characters. ‘00000’ means no error

16
Q

mysqli::$thread_id

int $mysqli->thread_id;

A

Returns the thread ID for the current connection which can then be killed using the mysqli_kill() function.
If the connection is lost and you reconnect with mysql_ping(), the thread ID will be other. Therefore you should get the thread ID only when you need it.

17
Q

mysqli::$warning_count

int $mysqli->warning_count;

A

Returns the number of warnings from the last query in the connection.