在中文中
QUESTIONS AND ANSWERS |100% RATED CORRECT |GRADED A+
When MySQL creates a prepared statement, it does something akin to a compiler in that it optimizes it so
that it has superior performance for multiple requests. - (ANSWER)True
As we discussed in the class, consider a MySQL database connection with mysqli (using $connection) run
successful. The following call will undo whatever it has done since the last commit.
mysqli_rollback($connection); - (ANSWER)True
As we discussed in the class, MySQL database has its auto-commit set "on" by default. - (ANSWER)True
As we discussed in the class, consider a MySQL database connection with mysqli (using $connection) is
successful. Which one of the following choices is a correct call to set a prepared statement ($statement)
with connection string ($connection) using a SQL query for a prepared statement ($sql)? -
(ANSWER)$statement = mysqli_prepare($connection, $sql);
As we discussed in the class, consider a MySQL database ($dbname) in a host ($dbhost) with a DB user
($dbuser) with its password ($dbpass), using mysqli. Which one of the following choices is the correct
connection call?
$dbhost = 'dbhost';
$dbname = 'dbname';
,$dbuser = 'dbuser';
在中文中
$dbpass = 'dbpass';
$dbport = 'dbport';
$connection = new _________; - (ANSWER)mysqli($dbhost, $dbuser, $dbpass, $dbname)
As we discussed in the class, consider a MySQL database connection with mysqli (using $connection) is
successful and its sql query ($sql) run successfully. Which one of the following choices is a correct call to
loop through the result ($result) with mysqli (not prepared statement) using while statement? -
(ANSWER)while($row = mysqli_fetch_assoc($result))
As we discussed in the class, consider a MySQL database connection with mysqli ($connection) is
successful. Which one of the following choices is the correct way to run a SQL query with $sql to get a
result set? - (ANSWER)mysqli_query($connection, $sql);
As we discussed in the class, consider a MySQL database ($dbname) in a host ($dbhost) with a DB user
($dbuser) with its password ($dbpass), using PDO. Which one of the following choices is the correct
connection call?
$dbhost = 'dbhost';
$dbname = 'dbname';
$dbuser = 'dbuser';
$dbpass = 'dbpass';
, $dbport = 'dbport';
在中文中
$pdo = new _________; - (ANSWER)PDO("mysql:host=$dbhost;dbname=$dbname,$dbuser,$dbpass)
A prepared statement of MySQL is actually a way to improve performance for queries that need to be
executed multiple times. - (ANSWER)True
As we discussed in the class, consider a MySQL database connection with PDO ($pdo) is successful and
got its SQL query result ($result). Which one of the following choices is a correct call to free the result
($result) and close the connection ($pdo) with mysqli? - (ANSWER)$result=null; $pdo = null;
To indicate a default value for a column, add the _____ property to its definition. - (ANSWER)DEFAULT
The asterisk in the query SELECT * FROM tablename means _____. - (ANSWER)every column
The _____ SQL command is used to select the database with which you want to work. - (ANSWER)USE
You can use the same column name in more than one database table. - (ANSWER)True
A single record can be removed from a table using _____ and a LIMIT clause or conditional. -
(ANSWER)DELETE