To execute an INSERT statement, you use the _____________________ method of the PDO object that connects to the database.
Back
The category name for the row in categories table that corresponds to the value in $category_id
Front
Code example 4-1
The starting code for the index.php file which is the first page of an application
Back
$results = $db->query($statement);
Front
Which of the following is the correct way to code a PHP statement that returns the result set for a SELECT statement that's stored in $statement if the PDO object is $db?
Back
query
Front
To execute a SELECT statement, you use the _____________________ method of the PDO object that connects to the database.
Back
new
Front
To create a PDO object, you code the _____________________ keyword, followed by PDO, followed by the three arguments that it requires.
Back
A PDOStatement object for the rows in the products table that have a category ID equal to the value in $category_id
Front
Code example 4-1
The starting code for the index.php file which is the first page of an application
Back
foreach
Front
To access the data for all of the rows in a result set that's returned by a SELECT statement, you can use a _____________________________ loop.
Back
PDOException object
Front
In the catch block of a try/catch statement for handling PDO exceptions, you can get a message that describes the exception by using the getMessage method of the
Back
PDOStatement
Front
To return an array for the first row of a result set that's returned by a SELECT statement, you use the fetch method of the _____________________________ object that represents the result set.
Back
Create a PDO object named $db that connects to the right database
Front
Code example 4-1
The starting code for the index.php file which is the first page of an application
Back
try-catch
Front
To handle the PDO exceptions that can occur when database methods are executed, you use a _____________________ statement.
Back
$product = $products->fetch();
Front
Which of the following is the correct way to code a PHP statement that puts the first row of PDOStatement object named $products in an array named $product?
Back
index
Front
1 / 1 pts
To access one of the elements in an array, you code the array name and a set of brackets that contains the _______________________ of the element you want to access.
Back
Server name
Front
When you create a PDO object, you have to pass all but one of these arguments to it: Which one is it?