CIST 2550 Final
A(n) ___ operator is used in PHP to perform mathetmatical calculations.
Arithmetic
Logical operators are used for comparing two ___ operands for equality.
Boolean
The ___ keyword is used with the ALTER TABLE statement to rename a column in a table.
CHANGE
__ assignment operators perform mathematical calculations on variables and literal values in an expression and then assign a new value to the left operand.
Compound
A ___ is a variable that increments or decrements with each iteration of a loop statement
Counter
The ___ portion of the SELECT statement determines which fields to retrieve from a table.
Criteria
To perform a reverse sort on query results from a SELECT statement, add the ___ keyword after the name of the field by which you want to perform the sort.
DESC
Using the COUNT() aggregate function, you can eliminate duplicate values by using the keyword(s) ___.
DISTINCT
The __ type is the specific category of information that a variable contains.
Data
___ a variable is the processing of assigning a first value to a variable.
Initiializing
The array_unshift() function adds __ element(s) to the beginning of the array.
One or more
___ are symbols, such as the ( + ) symbol that are used in expressions to manipulate operands.
Operators
What privilege allows the user to select records?
SELECT
If the content of a web page template section does not change unless the include file is modified, it is called a ___ section.
Static
In PHP, you must declare a global variable with the global keyword inside a function definition for the variable to be available within the scope of that function. True or false?
True
One of the most popular PEAR code modules is PEAR DB, which simplifies access between PHP and a database server.
True
One way to move a file in PHP is to copy with file with the copy() function, and then delete the original file with the unlink() function. True or false?
True
PHP includes a feature called magic quotes, which automatically adds a backslash ( \ ) to any single quote, double quote, or NULL character in submitted form data. True or false?
True
Placing a backslash in front of an apostrophe tells the PHP scripting engine that the apostrophe is to be treated as a regular keyboard character. True or false?
True
Relational databases are preferred solutions for large and complex collections of information. True or false?
True
The NOT NULL keywords are often used with primary keys to require that a field include a value. True or false?
True
The WHERE keyword specifies the conditions that must be met for records to be returned from a query. True or false?
True
The array_key_exists() function determines whether a given index or key exists. True or false?
True
The concatenation operator ( . ) combines several string variables and literal strings and assigns the new value to another variable. True or false?
True
The concatenation operator ( .) combines several string variables and literal strings and assigns the new value to another variable. True or false?
True
The default label contains statements that execute when the value returned by the switch statement expression does not match any case label. True or false?
True
The else clause can only be used with an if statement. True or false?
True
The fileperms() function allows the user to read the permissions associated with a particular file. True or false?
True
The function substr_count() returns the total number of characters in a string. True or false?
True
The last element is removed from the end of an array using the array_pop() function. True or false?
True
The modulus operator returns the remainder left from the division of two integers. True or false?
True
The move_uploaded_file() function moves the uploaded file from its temporary location to the permanent destination. True or false?
True
The mysql_info() function returns the number of operations for various types of actions, depending on the type of query. True or false?
True
The mysqli package is the object-oriented equivalent of the mysql package. True or false?
True
The subject argument of the mail function must be plain text without XHTML tags or character entities. True or false?
True
The switch statement controls program flow by executing a specific set of statements, depending on the value of an expression. True or false?
True
The syntax for the strtok() function is $variable=strtok(string, separators); True or false?
True
The value of the method attribute will either be post or get. True or false?
True
To update records in a table, use the UPDATE, SET, and WHERE keywords with the mysql_query() function. True or false?
True
When a form's submit button is pressed, each field on the form is sent to the Web server as a name/value pair. True or false?
True
When using text hyperlinks to navigate within a Web page template, the values that specify which dynamic content to show must be appended to the filename in the "href" attribute of the anchor tag. True or false?
True
When you add records to a table that includes an AUTO_INCREMENT field, you omit the column name and value from the lists. True or false?
True
With queries that return results, such as SELECT queries, you can use the mysql_num_rows() function to find the number of records returned from a query. True or false?
True
You append the \n carriage return escape sequence to the end of a line to identify the end of a line on a UNIX / Linux platform. True or false?
True
You can edit commands entered previously in the MySQL monitor. True or false?
True
You refer to the values in a multidimensional indexed array by including two sets of brackets, one which refers to the row an done which refers to the column. True or false?
True
You should always use direct database access functionality if it is available in PHP. True or false?
True
You use the fopen() function to open a handle to a file stream. True or false?
True
You would use the file_put_contents() function to quickly replace the contents of a file or append data to the end of an existing file. True or false?
True
One problem with the unset() function is that it does not renumber the remaining elements in the array. True or false?
True.
Regular expression patterns are enclosed in opening and closing delimiters. True or false?
True.
To keep your database from growing too large, you should choose the smallest data type possible for each field. True or false?
True.
To store text in a field, you specify a data type of ___ because the amount of storage space allocated will depend on the number of characters in the field.
VARCHAR
On a Macintosh platform, you append the ___ carriage return escape sequence to the end of the line.
\n
To summarize data in a set of records, you use a family of functions called ___ functions.
aggregate
Autoglobals are associative arrays whose elements are referred to with a(n) ___ key instead of an index number.
alphanumeric
The ___ function returns an array of elements that exist in one array but not in any other arrays to which it is compared.
array_diff()
Merge two or more arrays with the ___ function.
array_merge()
You use the ___ function to return a portion of an array and assign it to another array.
array_slice()
Autoglobals or superglobals are predefined ___.
arrays
The strcmp() function performs a __ comparison of two strings.
case-sensitive
The similar_text() function returns the number of ___ to (two?) strings have in common.
characters
Two arguments, source and destination, are used with the ___ function.
copy()
The query pointer is a way of keeping track of where you are in a resultset. true or false?
false
When you are finished working with a file stream, you use the ___ function to ensure that the file does not keep taking up space in your computer's memory.
fclose()
Every time you use the ___ function, the file pointer moves to the next character in the file.
fgetc()
What function returns a line and moves the file pointer to the next line?
fgets($handle[, length])
Instead of reading a large text file into PHP, you can use the ___ to iterate through a text file.
file pointer
The ___ function reads the contents of a text file that stores each individual line as an element of an indexed array.
file()
A ___ statement is used to iterate or loop through the elements in an array.
foreach
Because the fopen() function must be used with the ____ function, you can specify what type of operations can be performed on the file and where and how the data will be written.
fwrite()
The ___ function tests whether a variable contains a numeric data type.
is_numeric()
To sort an associative array by key, use the ___ function.
ksort()
In PHP, a(n) e-mail message is sent using the ___ function.
mail()
The ___ operator uses the % symbol to find the remainder of integer division.
modulus
The mysql_info function only returns query information when you add ___ records with the INSERT keyword.
more than one
When a query modifies a table but does not return a result, you use the ___ function to determine how many rows/records were affected.
mysql_affected_rows()
The function ____ returns the fields in the current row of a resultset into an associative array and moves the result pointer to the next row.
mysql_fetch_assoc()
To close the resultset, use ___.
mysql_free_result()
To return information about the MySQL database server version, use the ____ function
mysql_get_server_info(connection)
With an INSERT query, the __ function returns the number of records added and duplicated along with the number of warnings.
mysql_info()
The ___ package is designed to work with MySQL version 4.1.3 and higher.
mysqli
The ___ function only works when there are " . " and " .." are the only two entries present in a directory.
rmdir()
You must be logged in with the ____ account or have sufficient privileges to take away privileges from another user account
root
The ___ function returns an indexed array containing the names of files and directories in the specified directory.
scandir()
When you use a variable in a PHP program, you must be aware of the variable's ___.
scope
If the content of a Web page template section does not change unless the include file is modified, it is called a ___ section.
static
The ___ function randomly scrambles the order of characters in a string.
str_shuffle()
The ____ operation uses the === (triple equal sign) to compare two operands for equality and data type
strict equal
The ___ function is used to reverse the changes made by magic quotes or the addslashes() function.
stripslashes()
The most commonly used string counting function is the ___ function, which returns the total number of characters in a string.
strlen()
The ___ function converts all of the letters in a string to capital letters.
strtoupper()
By default, field values in an external text file that are being inserted in a table are separated by the __ keyboard character.
tab
An additional form attribute, enctype, with a value of "multipart/form-data" must be used to upload files. True or false?
true
Multidimensional arrays are not limited to ___.
two dimensions
The most common type of multidimensional array is a(n) __ array.
two-dimensional
The second digit in the file permission code assigns permissions to the ___.
user
Assignment operators are used to assign a ___ to a variable.
value
A result pointer is a special type of ___ that refers to the currently selected row in a resultset.
variable
The INSERT keyword determines the table into which records should be inserted. True or false?
False
You create one-to-many relationships when you want to break information into multiple, logical sets. True or false?
False
You use the array_unshift() function to remove the first element from the beginning of an array. True or false?
False
You will not receive an error if you attempt to use a foreach statement with any variable types other than arrays. True or false?
False
Constant names, like variable names, must begin with a $. True or false?
False.
You use the createDir() function to create a new directory. True or false?
False.
The array_shift() function removes the ___ element from the beginning of an array.
First
You use a ___ statement to create user accounts and assign privileges.
GRANT
The array_search() function determines whether a given value exists in an array and returns the negative value of the first matching element if it exists or false if ti does not exist. True or false?
False
The array_shift() function adds one or more elements to the beginning of an array. True or false?
False
The formal parameters within the parentheses of a function declaration are global variables. True or false?
False
The function substr_count() returns the total number of characters in a string. True or false?
False
The metacharacter, ____ , specifies an anchor at the end of the line.
$
There are security risks using the $_REQUEST autoglobal because it includes the content of the ___ autoglobal as well as the $_GET and $_POST autoglobals.
$_COOKIE
The script in the dynamic data section of the Web page will check the value of the ___ array to determine which page to display, assuming the name being passed is 'page'.
$_GET['page']
The ____ autoglobal can be used to access the result from form data sent with both the get and post methods
$_REQUEST
The ___ metacharacter is used to allow a string to contain an alternate set of substrings.
( | )
The symbol ___ appends one array to another.
+
ASCII values range from ____.
0 to 255
The include statement and the require statement perform the same function and can be used interchangeably. True or false?
False
The metacharacter ( ^) anchors characters to the end of a string. True or false?
False
The most commonly used array sorting functions are sort() and rsort() for associative arrays. True or false?
False
The mysql_delete_db(" dbname" [, connection]); script is used to delete a database. True or false?
False
The mysql_fetch_assoc() function returns the fields into an associative array and uses each row name as the array key. True or false?
False
The primary purpose of a semicolon in PHP is to identify the end of a line. True or false?
False
The source code for PHP can be viewed in the client browser. True or false?
False
The str_word_count() function returns the number of digits in a string. True or false?
False
The syntax for the copy_file() function is copy_file(source, destination). True or false?
False
The syntax for the copy_file() function is copy_file(source,destination). True or false?
False
The three levels of permissions for files and directories are Read, Write, and Delete. True or false?
False
To prevent code from trying to create a table that already exists, use the SHOE EXISTING TABLES command. True or false?
False
To prevent multiple users from modifying a file simultaneously, you need to use the file_lock() function. True or false?
False
When the form data is submitted using the get method, the form data is appended to the URL specified in the form's method attribute. True or false?
False
When the post method is used to submit a form, the name portion of the name/value pair becomes the value assigned to the array element. True or false?
False
When the post method is used to submit a form, the name portion of the name/value pair becomes the value assigned to the array element. true or false?
False
When you are finished working with query results retrieved with the mysql_query() function, you should use the mysql_free_resultset() function to close the resultset. True or false?
False
When you pass a variable name to the echo statement, you must enclose the variable name in double quotation marks. True or false?
False
With complex escaping from XHTML, you close one PHP block insert some XHTML elements, and then open another PHP block to continue the script. True or false?
False
You can specify the maximum size of an uploaded file using MAX_FILE_SIZE as a hidden input below the file input field. True or false?
False
You can use the opendir() function to return the file and directory names from the open directory. True or false?
False
PHP stores form data in an indexed array but cannot store data in an associative array. True or false?
False
SQL stands for sequential query language. True or false?
False
The "Test" database is automatically selected when you log into MySQL. True or false?
False
The ___ symbol is used to suppress any errors that might be generated by an expression to which it is prepended.
@
A function executes automatically. True or false?
False
A function must contain a parameter. True or false?
False
ASCII stands for American Standard Code for Internet Information. True or false?
False
All text strings must begin and end with double quotation marks. True or false?
False
An escape character tells the compiler or interpreter to exit the program at the escape character. True or false?
False
Arrays and objects are examples of the primitive data type. True or false?
False
Both the echo and print statements return a value of 1 if successful and 0 if not successful. True or false?
False
Constant names are always case sensitive. True or false?
False
Function arguments are the statements that do the actual work of the function and must be contained within the function braces. True or false?
False
Functions are placed within parentheses that follow a parameter name. True or false?
False
If you use an iteration function to move the internal array pointer either before the first element or after the last element in an array, the only way to move the array pointer back to a valid element is to use the unset() function. True or false?
False
In PHP, you can declare a variable without assigning a value to it. True or false?
False
Include statements support only absolute path notation. True or false?
False
My SQL assigns permissions to specify which actions and operations a user can perform with a table or database.
False
MySQL assigns permissions to specify which actions and operations a user can perform with a table or database. True or false?
False
MySQL is part of PHP. True or false?
False
The additional_headers argument needs to be formatted to conform to the syntax of headers in the ___ documentation
Internet Message Format
Use the __ statement to add multiple records from an external file to a database table.
LOAD_DATA
The operational constant of the flock() function that opens the file with an exclusive lock for writing is the ___.
LOCK_EX (exclusive lock!)
The parameters within the parentheses of a function declaration are what kind of variables?
Local
The __ operator uses the % symbol to find the remainder of integer division.
Modulus
___ reduces the size of a database and makes the data easier to work with.
Normalization
____ reduces the size of a database and makes the data easier to work with.
Normalization
A comparison operator returns a Boolean value of TRUE or FALSE after two operands have been compared. True or false?
True
A sticky form is redisplayed with the values that the user entered the last time the form was submitted. True or false?
True
A unary operator requires an operand before or after the operator. True or false?
True
Apache, PHP, and MySQL are all examples of open-source software. True or false?
True
Aside from its main function, the array_splice() function also renumbers the indexes in the array. True or false?
True
If you attempt to use a local variable outside the function in which it is declared, you receive an error message. True or false?
True
If you use a variable name in a text string enclosed by single quotation marks, the name of the variable will display. True or false?
True
If you want to open a file for reading and writing and place the file pointer at the end of the file, you use a mode argument of "a+"
True
In PHP programming, you can only use TRUE or FALSe to indicate Boolean Values. True or false?
True