Deck 8: Manipulating Mysql Databases With Php
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/84
العب
ملء الشاشة (f)
Deck 8: Manipulating Mysql Databases With Php
1
The mysql_delete_db("dbname"[, connection]); script is used to delete a database.
False
2
PHP, you use the mysql_send() function to send SQL statements to MySQL.
False
3
The PHP Extension and Application Representation (PEAR) is a committee that oversees the open source PHP code.
False
4
The first record added to a table that has an auto-incrementing primary key will be assigned a value of 0.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
5
When you add records to a table that includes an AUTO_INCREMENT field, you omit the column name and value from the lists.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
6
How you enable MySQL support in PHP depends on the version of PHP and how you installed MySQL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
7
The mysqli package is the object-oriented equivalent of the mysql package.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
8
A list of records that are returned from a query is called a resultset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
9
To prevent code from trying to create a table that already exists, use the SHOW EXISTING TABLES command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
10
You can suppress error message by using the error control operator (%).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
11
You can use the mysql_select_db() function to select a database or change to a different database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
12
The error control operator disables error checking.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
13
The query pointer is a way of keeping track of where you are in a resultset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
14
One of the most popular PEAR code modules is PEAR DB, which simplifies access between PHP and a database server.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
15
The PRIMARY KEY keywords are used to generate a unique id for each new row in a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
16
The mysql_error() function returns a value of FALSE if it detects an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
17
To update records in a table, use the UPDATE, SET, and WHERE keywords with the mysql_query() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
18
The mysql_connect() function returns a 1 if it connects to the database successfully or 0 if it doesn't.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
19
The mysql_close() function is used to explicitly close a database connection.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
20
The NOT NULL keywords are often used with primary keys to require that a field include a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
21
With queries that modify tables, but do not return results, such as INSERT, UPDATE, and DELETE queries, you use the mysql_modified_rows() function to determine the number of changed rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ____ package is designed to work with MySQL version 4.1.3 and higher.
A) mysql
B) mysqli
C) libmysql
D) ext_mysqli
A) mysql
B) mysqli
C) libmysql
D) ext_mysqli
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
23
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
24
You pass the mysql_affected_rows() function the variable containing the result pointer from the mysql_query() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
25
To return information about the MySQL database server version, use the ____ function.
A) mysql_get_client_info()
B) mysql_host_info(connection)
C) mysql_get_proto_info(connection)
D) mysql_get_server_info(connection)
A) mysql_get_client_info()
B) mysql_host_info(connection)
C) mysql_get_proto_info(connection)
D) mysql_get_server_info(connection)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
26
The mysql_fetch_row() function returns the fields in the current row of a resultset into an indexed array and moves the result pointer to the next row.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
27
To close a database connection, use ____.
A) close_connection()
B) mysql_close()
C) mysql_exit()
D) close_mysql()
A) close_connection()
B) mysql_close()
C) mysql_exit()
D) close_mysql()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
28
To delete records in a table, use the DELETE and WHERE keywords with the mysql_query() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
29
Almost every command sent to MySQL from PHP is executed with the ____ function.
A) mysql_connect()
B) mysql_select()
C) mysql_send()
D) mysql_query()
A) mysql_connect()
B) mysql_select()
C) mysql_send()
D) mysql_query()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
30
To open a connection to a MySQL database server, use ____.
A) mysql_connect()
B) open_connect()
C) connection_mysql()
D) open_mysql()
A) mysql_connect()
B) open_connect()
C) connection_mysql()
D) open_mysql()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
31
The mysql_info() function returns the number of operations for various types of actions, depending on the type of query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
32
The mysql_info() function also returns information for LOAD DATA queries.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
33
The mysql_query() function returns a result pointer that represents the query results when the SELECT or SHOW statement which returns a resultset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
34
The symbol (@), used to suppress error messages, is called ____.
A) supression operator
B) error control operator
C) null operator
D) no_error operator
A) supression operator
B) error control operator
C) null operator
D) no_error operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ___ function returns a text string describing the error in PHP code.
A) mysql_error()
B) mysql_errno()
C) mysql_err()
D) mysql_error_number()
A) mysql_error()
B) mysql_errno()
C) mysql_err()
D) mysql_error_number()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
36
To delete a database, use the ____ function.
A) mysql_delete_db()
B) mysql_drop_db()
C) mysql_delete_database()
D) mysql_drop_database()
A) mysql_delete_db()
B) mysql_drop_db()
C) mysql_delete_database()
D) mysql_drop_database()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
37
You select a database or change to a different database with the ____ function.
A) mysql_select_database()
B) mysql_change_database()
C) mysql_select_db()
D) mysql_change_db()
A) mysql_select_database()
B) mysql_change_database()
C) mysql_select_db()
D) mysql_change_db()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
38
The mysql_fetch_assoc() function returns the fields into an associative array and uses each row name as the array key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
39
You use the mysql_num_fields() function to return the number of _______________ in a query result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
40
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
41
A result pointer is a special type of ____ that refers to the currently selected row in a resultset.
A) variable
B) option
C) function
D) command
A) variable
B) option
C) function
D) command
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
42
The mysql_connect() function returns a ____________________ as an integer if it connects successfully to a database or a Boolean FALSE if it doesn't.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
43
Use the ___ function to return the number of fields in a query result.
A) mysql_return_fields()
B) mysql_num_fields()
C) mysql_count_fields()
D) mysql_field_results()
A) mysql_return_fields()
B) mysql_num_fields()
C) mysql_count_fields()
D) mysql_field_results()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
44
When a query modifies a table but does not return a result, you use the ___ function to determine how many rows/records were affected.
A) mysql_rows_affected()
B) mysql_affected_rows()
C) mysql_affected_records()
D) mysql_records_affected()
A) mysql_rows_affected()
B) mysql_affected_rows()
C) mysql_affected_records()
D) mysql_records_affected()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
45
The mysql_info() function only returns query information when you add ___ records with the INSERT keyword.
A) one
B) more than one
C) less than five
D) no records
A) one
B) more than one
C) less than five
D) no records
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
46
To change records in a table, use the UPDATE keyword to specify the name of the table to update and the ___ keyword to specify the value to assign to the fields in the records that match the condition in the WHERE keyword.
A) CHANGE
B) INSERT
C) PUT
D) SET
A) CHANGE
B) INSERT
C) PUT
D) SET
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
47
With an INSERT query, the ___ function returns the number of records added and duplicated along with the number of warnings.
A) mysql_update_info()
B) mysql_info()
C) mysql_update()
D) mysql_info_update()
A) mysql_update_info()
B) mysql_info()
C) mysql_update()
D) mysql_info_update()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
48
The mysqli (____________________) package became available with PHP 5 and is designed to work with MySQL version 4.1.3 and above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
49
Although they perform similar functions, PEAR DB is designed specifically to work with PHP and ____________________ is a more generic protocol used by many programming languages and database management systems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
50
The ___ keyword is often used with the primary key to generate a unique id for each new row in a table.
A) UNIQUE_ID
B) INCREMENT_ID
C) AUTO_INCREMENT
D) AUTO_INCREMENT_ID
A) UNIQUE_ID
B) INCREMENT_ID
C) AUTO_INCREMENT
D) AUTO_INCREMENT_ID
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
51
To add multiple records to a database from an external file, you use the ____ statement with the name of the local text file that contains the records you want to add.
A) INSERT DATA
B) LOAD DATA
C) INSERT RECORDS
D) UPLOAD RECORDS
A) INSERT DATA
B) LOAD DATA
C) INSERT RECORDS
D) UPLOAD RECORDS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
52
To close the resultset, use ____.
A) mysql_close()
B) mysql_kill()
C) mysql_exist()
D) mysql_free_result()
A) mysql_close()
B) mysql_kill()
C) mysql_exist()
D) mysql_free_result()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
53
The ___ keyword, often used with the primary key, requires that the field include a value.
A) NOT NULL
B) NOT BLANK
C) NOT EMPTY
D) NOT VOID
A) NOT NULL
B) NOT BLANK
C) NOT EMPTY
D) NOT VOID
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
54
PEAR stands for ________________________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
55
When mysql_query() returns a resultset, you use the ____ function to determine the number of records in the resultset.
A) mysql_result_rows()
B) mysql_num_result()
C) mysql_num_rows()
D) mysql_num_records()
A) mysql_result_rows()
B) mysql_num_result()
C) mysql_num_rows()
D) mysql_num_records()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
56
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.
A) mysql_fetch_lengths()
B) mysql_fetch_assoc()
C) mysql_fetch_rows()
D) mysql_fetch_array()
A) mysql_fetch_lengths()
B) mysql_fetch_assoc()
C) mysql_fetch_rows()
D) mysql_fetch_array()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
57
The function ____ returns the fields in the current row into an indexed array.
A) mysql_fetch_assoc()
B) mysql_data_seek()
C) mysql_fetch_row()
D) mysql_fetch_lengths()
A) mysql_fetch_assoc()
B) mysql_data_seek()
C) mysql_fetch_row()
D) mysql_fetch_lengths()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
58
The list of records that is returned from a mysql_query() is a called a ____.
A) recordset
B) resultset
C) result
D) result query
A) recordset
B) resultset
C) result
D) result query
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
59
The ____ command with a mysql_query() function executes successfully if the table already exists.
A) SHOW EXISTING TABLE
B) SHOW MATCHING TABLE
C) SHOW SAME TABLE
D) SHOW TABLES LIKE
A) SHOW EXISTING TABLE
B) SHOW MATCHING TABLE
C) SHOW SAME TABLE
D) SHOW TABLES LIKE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
60
To delete records in a table, use the keywords ____.
A) DELETE, RECORD
B) DELETE, WHERE
C) REMOVE, WHERE
D) REMOVE, RECORD
A) DELETE, RECORD
B) DELETE, WHERE
C) REMOVE, WHERE
D) REMOVE, RECORD
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
61
When adding a record to a table, you can specify ____________________ in any fields for which you do not have a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
62
To prevent your code from trying to create a table that already exists, use the ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
63
The mysql_errno() function returns the ____________________ code of an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
64
You can suppress error messages in PHP using the _________________________ (@).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
65
To add multiple records to a database from an external file, you use the ____________________ statement with the name of the local text file that contains the records you want to add.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
66
The first field created using the AUTO_INCREMENT keyword is assigned a value of ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
67
To create a table, use the ____________________ statement with the mysql_query() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
68
If you are connecting to an instance of the MySQL database server that is running on the same server as the PHP scripting engine, use a value of ____________________ or "127.0.0.1" for the host argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
69
The ____________________ function is used to select a database or change to a different database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
70
You pass the mysql_close() function the database ____________________ variable to close the database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
71
Use the _________________________ function to determine the number of rows affected by an INSERT statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
72
To delete a database, you use the ____________________ function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
73
The ____________________ is a special type of variable that refers to the currently selected row in records returned by MySQL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
74
In PHP, use the mysql_query() function to send SQL statements to ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
75
Because the client and server are defined in relation to MySQL, the Web server where the PHP script is running is the ____________________ when communicating with the MySQL server.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
76
Because the ____________________ function exits the script immediately if an error occurs, any further script output is not displayed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
77
To delete a table, use the ____________________ statement with the mysql_query() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
78
The ____________________ function returns the number of rows in a query result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
79
To delete all the records in a table, you use the DELETE statement but omit the ____________________ keyword.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck
80
The ____________________ function returns the number of rows in a query resultset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 84 في هذه المجموعة.
فتح الحزمة
k this deck