Podcast
Questions and Answers
MySQL is the most popular database platform used with Python.
MySQL is the most popular database platform used with Python.
False (B)
Mysqli_ functions are an improved version from PHP5.
Mysqli_ functions are an improved version from PHP5.
True (A)
The default server when connecting to a MySQL database is 'localhost'.
The default server when connecting to a MySQL database is 'localhost'.
True (A)
To select a database in MySQL, you use the function mysqli_choose_db().
To select a database in MySQL, you use the function mysqli_choose_db().
Each MySQL database server can only contain one database.
Each MySQL database server can only contain one database.
$db is a variable used in PHP to refer to the connection created with a MySQL database.
$db is a variable used in PHP to refer to the connection created with a MySQL database.
When making queries that return information, such as SELECT statements, the result is stored in the variable $result.
When making queries that return information, such as SELECT statements, the result is stored in the variable $result.
All queries return TRUE upon success.
All queries return TRUE upon success.
The best practice when handling errors in PHP MySQL queries is to use die(mysql_error()).
The best practice when handling errors in PHP MySQL queries is to use die(mysql_error()).
The mysqli_fetch_assoc() function in PHP turns a row of the query result into key-value pairs.
The mysqli_fetch_assoc() function in PHP turns a row of the query result into key-value pairs.
The mysqli_fetch_array() function in PHP returns the query result as an object.
The mysqli_fetch_array() function in PHP returns the query result as an object.
To access rows returned by a query using mysqli_fetch_array(), you can use associative keys like $retrieve['lastname'].
To access rows returned by a query using mysqli_fetch_array(), you can use associative keys like $retrieve['lastname'].