Test 1 Study Guide

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which PHP class can be used to connect to a MySQL database? > db > PDO > DataConnect > argument

PDO

Which of the following is a class used for errors thrown by the PDO library? > PDOException > PDOCatch > PDOHandler > CatchException

PDOException

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: > PDO object > PDOStatement object > PDOException object > Result set array

PDOException object

Which of the following software components generates the HTML that is returned in an HTTP response? > Apache > MySQL > Chrome > PHP

PHP

When the web server receives an HTTP request for a PHP page, the web server calls the: > database server > static web page > web browser > PHP interpreter

PHP interpreter

Which method of the form passes data without appending the parameters to the URL? > GET > POST > ACTION > APPEND

POST

Which of the following is not a database server that can be used for dynamic Web pages? > MySQL > SQL Server > Oracle > Python

Python

Which clause in a SQL statement specifies the records to return based on criteria? > SELECT > FROM > WHERE > ORDER BY

WHERE

What is the goal of testing an application before it is put into production? > fix all errors > find all errors > create errors > fix the most critical errors

find all errors

Which HTML tag or element is used to load an external stylesheet? > script > link > style > type

link

Which attribute of a form element determines how the data is passed to a file? > action > method > submit > default

method

Which of the following consists of the PHP files that represent the data of the applications? > controller > model > inheriter > requester

model

When you ________________ a request, all processing takes place on the server. > forward > initiate > cancel > demand

forward

The HTTP response for a dynamic web page is passed: > from PHP to the browser > from the web server to the browser > from the database server to the web server > from the web server to PHP

from the web server to the browser

Which function can be used to redirect a request to another URL? > include( ) > require( ) > header( ) > response( )

header( )

Which of these would NOT be considered a common syntax error in PHP? > misspelling keywords > forgetting to end a statement with a semicolon > forgetting a closing quotation mark > multiplying by the wrong variable

multiplying by the wrong variable

Each row in a table should be able to be uniquely identified by a: > primary key > field name > cell > record

primary key

Which of the following is not a compound assignment operator in PHP? > += > -= > %= > !=

!=

In PHP, all variables begin with a: > $ > & > lowercase letter > uppercase letter

$

To round and format the value of a variable named $number to 3 decimal places and store it in a variable named $number_formatted, you code: > $number_formatted = number_format($number, 3, round); > $number_formatted = number_format($number, 3); > $number_formatted = format_number($number, 3, round); > $number_formatted = format_number($number, 3);

$number_formatted = number_format($number, 3);

Code example 5-1 function get_product($product_id) { global $db; $query = 'SELECT * FROM products WHERE productID = :product_id'; $statement = $db->prepare($query); $statement->bindValue(':product_id', $product_id); $statement->execute(); $product = $statement->fetch(); $statement->closeCursor(); return $product; } (Refer to code example 5-1) Which of the following is a proper PHP statement for calling the function in this example. > $product = get_product($product_id); > $product = get_product(product_id); > $product = $get_product($product_id); > $product = $get_product(product_id);

$product = get_product($product_id);

Which character is used to separate the original URL from the parameters that are appended to it? > ? > & > $ > =

?

Code example 3-1 SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors INNER JOIN invoices ON vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC When you code a DELETE statement, you usually need to include: > a SORT BY clause > a WHERE clause > an inner join > an outer join

a WHERE clause

A request and response for a file are made by: > a browser and an application > a client and an agent > the Web page > a client and a server

a client and a server

An advantage of using MySQL is: > cost > speed > ease of use > all of these

all of these

Which of the following can be displayed if you omit the filename of a URL? > index.htm > index.html > index.php > all of these

all of these

Which of the following can be used in a conditional expression? > equality operators > relational operators > logical operators > all of these

all of these

Which of the following is a relational operator in PHP? > < > <= > > > all of these

all of these

An index for a PHP array: > must be a string > must be a number > can be a number or a string > does not exist

can be a number or a string

Which type of input element should be used on a form when the user can select zero, one, or many of the options in a group? > checkbox > radio > text > submit

checkbox

To print a variable with the echo statement, you simply pass the variable name to the echo statement. For example: > echo "$VotingAge;" > echo $VotingAge; > echo &VotingAge; > echo(VotingAge;)

echo $VotingAge;

What does $salutation contain after the following code executes? $company_name = ''; $salutation = $company_name ?? 'To whom it may concern'; > empty string ('') > null > To whom it may concern

empty string ('')

Which type of loop will always execute its code at least once? > while > do-while > for > for-in

do-while

A hidden field: > appears on the form but its data is hidden > has data that is obscured by bullets or asterisks > doesn't appear on the form but its data is sent to the server > appears on the form with its data grayed out

doesn't appear on the form but its data is sent to the server

The equality operator consists of two ________________ signs and performs a different function than the one performed by the assignment operator that consists of a single sign. > percent > greater than > equal > division

equal

A/An ________________ is an object that contains information about an error. > exception > PDO class > MySQL database > username

exception

Which of the following is software that is a Web server? > Apache > MySQL > phpMyAdmin > htdocs

Apache

________________ are used in PHP to perform mathematical calculations, such as addition. > Arithmetic operators > Binary operators > Unary operators > Bitwise operators

Arithmetic operators

Which of the following is an object that contains information about an error that occurred? > catch > exception > handler > block

exception

A switch statement in PHP starts by evaluating a switch ________________. > case > expression > return statement > break

expression

Which of the following is a method of the PDOStatement class that returns an array for the next row in a result set? > fetch() > sit() > getArray() > getRow()

fetch()

The goal of testing is to: > fix all errors in the application > find all errors in the application > make sure the application works with valid data > make sure the application works with invalid data

find all errors in the application

What is the goal of debugging an application before it is put into production? > fix all errors > find all errors > minimizing errors > create job security

fix all errors

Which of the following can be used to get the data from an array that contains all rows of a result set? > roll over > fetch() method > foreach statement > forall loop

foreach statement

What does a relational database use to relate the tables in a database to other tables? > indexes > foreign keys > non-primary keys > primary keys

foreign keys

A ________________ value is a value of true and false. > Switch > Null > Constant > Boolean

Boolean

To make a variable that is declared outside of a function usable inside the PHP function, which keyword can be used? > local > module > public > global

global

Which of the following can a SELECT statement NOT do to the data in a table? > Get selected rows > Get selected columns > Sort the rows > Delete the rows

Delete the rows

When creating a function, ________________ can be included in the parentheses that follow the name. > parameters > properties > controllers > formatters

parameters

What is the concatenation operator in PHP? > ampersand (&) > plus sign (+) > period (.) > pound sig (#)

period (.)

What does a relational database use to uniquely identify each row in a table? > indexes > foreign keys > non-primary keys > primary keys

primary keys

The first part of a URL is called the: > domain identifier > directory > protocol > filename

protocol

Which type of input element should be used on a form when the user can select only one of the options? > checkbox > radio > text > submit

radio

How many data types are used by PHP? > six > nine > eleven > twelve

six

Which of the following lists the functions in the reverse order in which they were called? > stack trace > breakpoint > called collection > IntelliSense

stack trace

When HTML was first developed, Web pages were typically: > cryptic > invisible > dynamic > static

static

Code example 2-1 <h1>Future Value Calculator</h1> <?php if (!empty($error_message)) { ?> <p class="error"><?php echo $error_message; ?></p> <?php } ?> <form action="display_results.php" method="post"> <div id="data"> <label>Investment Amount:</label> <input type="text" name="investment" value="<?php echo $investment; ?>"/><br /> <label>Yearly Interest Rate:</label> <input type="text" name="interest_rate" value="<?php echo $interest_rate; ?>"/><br /> <label>Number of Years:</label> <input type="text" name="years" value="<?php echo $years; ?>"/><br /> </div> (Refer to code example 2-1) If this code is from the first page of this application, what does the if statement in the PHP tag do the first time this page is executed? > Displays an error message in a <p> tag > Displays an empty error message in a <p> tag > Displays an empty <p> tag > Doesn't do anything because $error_message will be empty

Doesn't do anything because $error_message will be empty

________________ operators are used for combining conditional expressions. > Equal > Binary > Logical > Or

Equal

Which clause in a SQL statement specifies the table(s) that should supply the data that is returned? > SELECT > FROM > WHERE > ORDER BY

FROM

Which of the following is NOT a common MySQL privilege? > INSERT TABLE > SELECT > UPDATE > DELETE

INSERT TABLE

Which character is used to separate parameters that are appended to a URL? > $ > & > ? > =

&

Which of the following can be used to style a label in an id named data? > data_label > .data label > label.data > #data label

.data label

What extension of a filename is typically associated with a static Web page? > .htm > .asp > .php > .pl

.htm

How many times will the while loop that follows be executed? $months = 5; $i = 1; while ($i > $months) { $futureValue = $futureValue * (1 + $monthlyInterestRate); $i = $i+1; } > 0 > 1 > 4 > 5

0

If $total_months has a value of 13, what does $message contain after this if statement is executed? $years = $total_months / 12; $years = number_format($years); $months = $total_months % 12; if ( $years == 0 ) { $message = $months . " months"; } else if ( $months == 0 ) { $message = $years . " years"; } else { $message = $years . " years, and " . $months . " months"; } > 1 years, and 1 months > 1 year, and 1 month > 1 years > 1 year

1 years, and 1 months

What will $future_value contain after the for loop that follows has been executed one time? $years = 10; $annual_rate = 10; $future_value = 1000; $annual_rate = $annual_rate / 100; for ( $i = 1; $i <= $years; $i++ ) { $future_value = $future_value * (1 + $annual_rate); } > 1000 > 1100 > 11000 > 1010

1100

What does $shipping_cost contain after the following code executes? $quantity = 3; $shipping_cost = ($quantity > 1) ? 5 + ($quantity * 2.5) : 5; > 5 > 7.5 > 10 > 12.5

12.5

After the code that follows is executed, what will the value of $units_per_store be? $units = 30; $stores = 4; $units_per_store = $units % $stores; > 7 > 7.5 > 2 > 0

2

How many radio buttons from the following code can be selected at any given time? <input type="radio" name="address" value="Home">Home Address <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS > 0 > 1 > 2 > 3

2

Which of the following operators does NOT perform type coercion? > == > === > >= > !=

===

How many operands does a ternary operator have? > 1 > 4 > 3 > 2

3

Code example 3-1 SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors INNER JOIN invoices ON vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC (Refer to code example 3-1.) How many columns will the result set have? > 4 > 5 > 6 > 7

4

After the if statement that follows is executed, what will the value of $discount_amount be? $discount_amount; $order_total = 200; if ($order_total > 200) { $discount_amount = $order_total * .3; } else if ($order_total > 100) { $discount_amount = $order_total * .2; } else { $discount_amount = $order_total * .1; } > 0 > 20 > 40 > 60

40

If a PHP array contains 7 elements, what is the number of the index of the seventh element? > 6 > 7 > 0 > 8

6

After the code that follows is executed, what will the value of $units_per_store be? $units = 30; $stores = 4; $units_per_store = intdiv($units, $stores); > 7 > 7.5 > 2 > 0

7

Which of the following is considered the assignment operator in PHP? > $ > & > = > #

=

Which of the following is NOT a common MySQL data type? > CHAR > VARCHAR > INT > DBL

DBL

The ________________ for a MySQL connection specifies the host computer for the MySQL database and the name of the database. > username > password > DSN (Data Source Name) > server name

DSN (Data Source Name)

Assume that the second radio button in the code below has been selected by the user. When you get the value of that radio button, what will the value be? <input type="radio" name="delivery" value="USPS">USPS <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS > FedEx > Federal Express > fedex > federal express

FedEx

What does $message contain after the following code executes? $statusCode = "403"; switch ( $statusCode ) { case "200": $message = "OK"; break; case "403": $message = "Forbidden"; break; case "404": $message = "Not Found"; break; default: $message = "Unknown Status"; break; } > OK > Forbidden > Not Found > Unknown Status

Forbidden

Which method of the form appends values to the URL to pass data? > GET > POST > ACTION > APPEND

GET

What type of SQL statement is used to assign user privileges in MySQL? > GIVE > ASSIGN > GRANT > REVOKE

GRANT

What type of a request does a Web browser typically send to a server? > IPsec > TCP/IP > HTTP > FTP

HTTP

Which clause in a SQL statement is typically used to return data from more than one table? > SELECT > FROM > WHERE > JOIN

JOIN

What does $message contain after the following code executes? $message = "L: "; for ($i = 0; $i < 10; $i++ ) { $message .= $i . ", "; if ($i == 7) break; } > L: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, > L: 0, 1, 2, 3, 4, 5, 6, 7, > L: 1, 3, 5, 7, 9, > L: 1, 3, 5, 7

L: 0, 1, 2, 3, 4, 5, 6, 7,

Which of the following is NOT true about MariaDB? > It is being maintained by many of the original developers of MySQL. > One goal is to maintain high compatibility with MySQL. > Newer versions of XAMPP use MariaDB rather than MySQL. > Like MySQL, it is owned by Oracle.

Like MySQL, it is owned by Oracle.

What does the acronym MVC stand for? > Module-View-Controller > Most-Valuable-Computer programmer > Mixed-Vector-CPU > Must-Verify-Constraints

Module-View-Controller

Assigning ________________ to a variable indicates the variable does not contain a usable value. > ZERO > NONE > BLANK > NULL

NULL

Which clause in a SQL statement specifies how the result set should be sorted? > SELECT > FROM > WHERE > ORDER BY

ORDER BY

What does $message contain after the following code executes? $rate = 0.1; if ( ! is_numeric($rate) ) { $message = 'Rate is not a number.'; } else if ($rate < 0) { $message = 'Rate cannot be less than zero.'; } else if ($rate > 0.2) { $message = 'Rate cannot be greater than 20%.'; } else { $message = 'Rate is valid.'; } > Rate is not a number. > Rate cannot be less than zero. > Rate cannot be greater than 20%. > Rate is valid.

Rate is valid.

Which clause in a SQL statement specifies the columns to return? > SELECT > FROM > WHERE > ORDER BY

SELECT

Which type of SQL statement returns a result set? > UPDATE > CREATE > SELECT > INSERT

SELECT

When you create a PDO object, you have to pass all but one of these arguments to it: Which one is it? > Data source name > Server name > User name > Password

Server name

Code example 2-1 <h1>Future Value Calculator</h1> <?php if (!empty($error_message)) { ?> <p class="error"><?php echo $error_message; ?></p> <?php } ?> <form action="display_results.php" method="post"> <div id="data"> <label>Investment Amount:</label> <input type="text" name="investment" value="<?php echo $investment; ?>"/><br /> <label>Yearly Interest Rate:</label> <input type="text" name="interest_rate" value="<?php echo $interest_rate; ?>"/><br /> <label>Number of Years:</label> <input type="text" name="years" value="<?php echo $years; ?>"/><br /> </div> (Refer to code example 2-1) If this code is from the first page of this application, what do the three <input> tags display the second time this page is executed? > Text boxes that contain zero values > Text boxes that contain empty strings > Text boxes that contain the data the user entered the first time the page was displayed > The text boxes aren't displayed because the condition in the if statement is false

Text boxes that contain the data the user entered the first time the page was displayed

What does $message contain after the following code executes? $age = 19; $score = 750; if ( $age >= 21 && $score >= 700 ) { $message = 'Loan approved'; } else if ( $age >= 21 && $score >= 650 ) { $message = 'Cosigner needed.'; } else if ( $age >= 18 && $score >= 680 ) { $message = 'Two cosigners needed.'; } else { $message = 'Loan denied.'; } > Loan approved. > Cosigner needed. > Two cosigners needed. > Load denied.

Two cosigners needed.

URL stands for: > Universal Refresh Location > Uniform Resource Locator > Unique Register Location > Undeclared Resource Location

Uniform Resource Locator

Assume that the statements that follow get the data from a text area named comments. After these statements are executed, how will the $comments_esc variable be displayed by an echo statement? $comments = filter_input(INPUT_POST, 'comments'); $comments_esc = htmlspecialchars($comments); > With character entities for both special characters and new line characters > With <br> tags for new line characters > With character entities for special characters > With both character entities and <br> tags

With character entities for special characters

If a URL specifies a directory that doesn't contain a default page, Apache displays: > an error message > a list of the PHP applications in that directory > a list of all of the web applications in that directory > a list of all of the directories in that directory

a list of all of the directories in that directory

When you use the header() function to redirect a request: > a response is sent to the web server so it requests another page > the web server returns a new page to the browser > a response is returned to the browser that tells it to request another page > the web server returns a new page to the controller of the MVC pattern

a response is returned to the browser that tells it to request another page

Code example 3-1 SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors INNER JOIN invoices ON vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC (Refer to code example 3-1.) If vendorName contains string data and invoiceTotal contains decimal values, how will the result set be ordered? > alphabetically starting with A > alphabetically starting with Z > numerically starting with 0 > numerically starting with 500

alphabetically starting with Z

Code example 5-1 function get_product($product_id) { global $db; $query = 'SELECT * FROM products WHERE productID = :product_id'; $statement = $db->prepare($query); $statement->bindValue(':product_id', $product_id); $statement->execute(); $product = $statement->fetch(); $statement->closeCursor(); return $product; } (Refer to code example 5-1) What does this function return when it is called? > an array of all the rows in the products table > an array of all the rows with the specified category ID > an array of the columns in the first row of the products table > an array of the columns in the row with the specified product ID

an array of the columns in the row with the specified product ID

A join that returns records from related tables only if their related fields match is called: > an outer join > an inner join > a cross join > a data join

an inner join

In HTML, parameters are called: > attributes > properties > switches > options

attributes

To make it easier to enter names into your code, NetBeans provides a feature known as: > error checking > auto-completion > syntax coloring > warning icons

auto-completion

To execute a prepared SQL statement, you can use the ________________ and execute() methods of the PDOStatement object to set parameter values and execute the statement. > fetch() > bindValue() > exec() > elements()

bindValue()

A/an ________________ statement can be used to jump out of a loop.

break

Which type of statement ends or jumps out of a loop? > break > continue > for > next

break

When debugging an application, you can set a(n) ________________ to view the value of a variable at a particular point. > debug > rebug > breakpoint > exception

breakpoint

A web application is a type of: > client/server application > database application > client-side application > server-side application

client/server application

A ________________ contains a value that does not change during the course of program execution. > variable > constant > function > integer

constant

Which of the following statements will restart the execution of a loop? > halt > continue > stop > break

continue

Which type of statement ends the current iteration of a loop? > break > continue > switch > conditional

continue

In the code that follows, if $error_message isn't empty if ($error_message != '') { include('index.php'); exit(); } > control is passed to a page named index.php that's in the current directory > control is passed to a page named index.php that's in the parent directory > control is passed to a page named index.php that's in the child directory > nothing happens because the condition is false

control is passed to a page named index.php that's in the current directory

A switch statement in PHP is often useful in the ________________ of an application that uses the MVC pattern. > model > view > controller > header

controller

Which of the following receives requests from users, gets the appropriate data, and returns the appropriate views to the users? > controller > view finder > model > verifier

controller

When you use the htmlspecialchars() and nl2br() functions to process a user's entry and then pass that entry to a web page, the browser will > process any HTML tags that the user entered instead of displaying them > display any HTML tags entered by the user instead of processing them > execute any JavaScript code entered by the user > ignore any line breaks entered by the user

display any HTML tags entered by the user instead of processing them

Code example 3-1 SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors INNER JOIN invoices ON vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC When you code an INSERT statement, you don't have to include the data for a column that: > is a foreign key > is a primary key > has a default value > does not allow null values

has a default value

Which PHP function converts some special characters into character entities? > htmlspecialchars() > convertchars() > substr() > double_encode()

htmlspecialchars()

Which URL can be used to start phpMyAdmin on a local system? > http://localhost/phpmyadmin > http://phpmyadmin > http://phpmyadmin.localhost > phpmyadmin://localhost

http://localhost/phpmyadmin

Which function can be used to forward a request from one PHP file to another? > include( ) > location( ) > return( ) > response( )

include( )

The order of precedence for arithmetic expressions causes: > addition to be done before subtraction > multiplication to be done before division > increment operations to be done first > modulus operations to be done last

increment operations to be done first

Which HTML element is used to create items in a drop-down list? > list > item > option > value

option

A(n) ________________ is a positive or negative number with no decimal places. > variable > exponential notation > floating-point number > integer

integer

When double quotes are used to assign values to string variables, the PHP interpreter must check the entire string to see if it contains any variables that need to be inserted into the string. This process is called: > interpolation > concatenation > encapsulation > initialization

interpolation

a PHP variable name: > is case-sensitive > can contain special characters > can start with a letter, a digit, or two underscores > can be a PHP reserved word

is case-sensitive

One reason for using the header() function to redirect a request: > is that it's more efficient than forwarding a request > is to have a PHP file run itself again > is to reduce the number of round trips that are required > is to do all processing for the request on the server

is to have a PHP file run itself again

Which PHP function can be used to determine if a checkbox is checked? > is_checked() > boolean() > isset() > value()

is_checked()

While loops and for loops are often referred to as ________________ structures. > selection > sequence > iteration > ill-advised

iteration

Which type of error is often most difficult to find and fix? > syntax > runtime > logic > complex

logic

An error that lets the application run but produces the wrong results is known as a: > runtime error > user error > logic error > syntax error

logic error

When you use the MVC pattern, you: > make each layer as independent as possible > perform all data validation on the client > use the pattern for every page in the application > put all of the PHP code in the controller

make each layer as independent as possible

The ________________ operator divides one operand by another operand and returns the remainder. > addition > subtraction > division > modulus

modulus

Which optional attribute of a select element allows the user to select more than one option in a list box? > size > multiple > morethanone > plural

multiple

In order to group multiple radio buttons so that only one of the radio buttons can be selected at a time, which attribute of the input element must have the same value for all radio buttons in the group? > checked > value > name > id

name

Which keyword is used to create an object from a class in PHP? > new > create > instantiate > argument

new

Which of the following is NOT part of an HTTP URL: > protocol > path > node > filename

node

If a row in one table is related to just one row in another table, the tables are said to have a: > one-to-many relationship > one-to-one relationship > many-to-many relationship

one-to-one relationship

When you ________________ a request, the server returns a response that tells the browser to request another URL. > forward > initiate > cancel > redirect

redirect

Which of the following is a term that refers to modifying the organization or structure of an application? > interpolation > refactoring > instantiation > inheritance

refactoring

If many different files may load an external file, what statement can be used instead of 'include' to make sure the external file is only loaded once? > one_time > require_once > include_first > load_once

require_once

Which type of statement should be included if the function should send a value back to where the function was called? > return > send > parameter > argument

return

To view the source code for a web page in a web browser, you can display the View Source command by: > restarting the browser > clicking on the File menu > right-clicking on the page > none of the above

right-clicking on the page

A table in a relational database consists of columns and ________________.

rows

When you click on the Continue button while you're debugging with NetBeans, the application: > runs to the next breakpoint > executes the next statement in sequence > lets you step through the statements > removes the breakpoint

runs to the next breakpoint

Which type of error does not violate the rules for how PHP statements must be written but will cause the PHP interpreter to display errors? > syntax > runtime > logic > complex

runtime

The type of error that does not violate syntax rules, but causes the PHP interpreter to display errors is called a: > runtime error > user error > logic error > syntax error

runtime error

Which HTML element is used to create a drop-down list? > select > list > drop-down > input

select

An if statement can be used to implement a ________________ structure. > selection > sequence > case > logical

selection

Which type of error is considered the easiest to find? > syntax > runtime > logic > invisible

syntax

Which type of error is considered the easiest to fix? > syntax > runtime > logic > complex

syntax

When you test an application with NetBeans and a breakpoint is reached, you can click: > the Step Through button to step through the statements one at a time > the Step Into button to execute the current statement and move to the next statement > the Step Over button to skip execution of the next statement > the Step Out button to continue normal execution of the application

the Step Into button to execute the current statement and move to the next statement

Which of the following is NOT a benefit of using the MVC pattern for an application? > it's easier to make changes to the application > web designers can work independently on the view > there's less repetition of code > it's easier to test and debug the application > the application runs more efficiently

the application runs more efficiently

To deploy a PHP application on your own computer, you copy the application root directory to: > the htdocs directory of the Apache server > the htdocs directory of the MySQL server > the xampp directory of the Apache server > the xampp directory of the MySQL server

the htdocs directory of the Apache server

When you use the MVC pattern, the controller gets the HTTP requests and then directs the use of the files that represent: > the model, the view, and the database > the database and the view > the model, the view, and the user interface > the model and the view

the model and the view

To handle exceptions, first you code a/an ________________ around any PHP statements that might throw an exception. > method > try/catch statement > try block > MySQL statement

try block

The result set retrieved by the following SELECT statement contains rows that have SELECT balance, number FROM accounts WHERE balance < 0 > all of the columns from the accounts table > two of the rows from the account table > all of the columns from the accounts table where balance is less than 0 > two of the columns from the accounts table where balance is less than 0

two of the columns from the accounts table where balance is less than 0

To run a PHP application that has been deployed on your own computer, you can enter a URL in the address bar of your browser that: > specifies just the application root directory > uses localhost as the domain name > specifies just the application root directory and the starting filename > uses apache as the domain name

uses localhost as the domain name

Code example 3-1 SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors INNER JOIN invoices ON vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC (Refer to code example 3-1.) What table(s) does the data in the result set come from? > vendors > invoices > vendors and invoices

vendors and invoices

Which of the following consists of the PHP and HTML files that represent the user interface of an application? > logic > model > view > classes

view

The column definition for a MySQL table can be used to determine all but one of the following. Which one is it? > what type of data the column can contain > whether the column can contain a null value > whether the column has a default value > what range of values the column can contain

what range of values the column can contain


Conjuntos de estudio relacionados

Commercial Mortgage-Backed Securities

View Set

Chapter 10: Principles of Fluid and Electrolytes

View Set

Regression Models Assignment and Quiz 90%

View Set