Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code example 4-1 The starting code for the index.php file which is the first pag

ID: 3656148 • Letter: C

Question

Code example 4-1 The starting code for the index.php file which is the first page of an application <?php require 'database.php'; $category_id = $_GET['category_id']; if (!isset($category_id)) { $category_id = 1; } // Routine 1 $query = "SELECT * FROM categories WHERE categoryID = $category_id"; $category = $db->query($query); $category = $category->fetch(); $category_name = $category['categoryName']; // Routine 2 $query = "SELECT * FROM products WHERE categoryID = $category_id ORDER BY productID"; $products = $db->query($query); ?> (Refer to code example 4-1) What does routine 2 store in the variable named $products? Answer a. A PDOStatement object for the rows in the products table that have a category ID equal to 1 b. A PDOStatement object for the columns in the first row in the products table c. A PDOStatement object for all rows in the products table d. A PDOStatement object for the rows in the products table that have a category ID equal to the value in $category_id

Explanation / Answer

http://www.oracle.com/technetwork/server-storage/solaris10/index-136406.html

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote