Sail E0 Webinar

MCQs

Total Questions : 20 | Page 1 of 2 pages
Question 1. Which one of the following statements should be used to include a file?
  1.    #include 'filename';
  2.    include 'filename';
 Discuss Question
Answer: Option B. -> include 'filename';


An example of this- #include 'mysql.connect.php';//begin database selection and queries.?>


Question 2. Which one of the following methods is responsible for sending the query to the database?
  1.    query()
  2.    send_query()
  3.    sendquery()
  4.    query_send()
 Discuss Question
Answer: Option A. -> query()


Its prototype looks like-class mysqli{mixed query(string query [, int resultmode])}


Question 3. Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
  1.    num_rows()
  2.    affected_rows()
  3.    changed_rows()
  4.    new_rows()
 Discuss Question
Answer: Option B. -> affected_rows()


The method num_rows() is only useful for determining the number of rows retrieved by a SELECT query. But to retrieve the number of rows affected by INSERT, UPDATE, or DELETE query, use affected_rows().


Question 4. Which of the methods are used to manage result sets using both associative and indexed arrays?
  1.    get_array() and get_row()
  2.    get_array() and get_column()
  3.    fetch_array() and fetch_row()
  4.    fetch_array() and fetch_column()
 Discuss Question
Answer: Option C. -> fetch_array() and fetch_row()


Their prototype is as follows- calss mysqli_result{mixed fetch_array ([int resulttype])}calss mysqli_result{mixed fetch_row()}


Question 5. Which one of the following methods recuperates any memory consumed by a result set?
  1.    destroy()
  2.    remover()
  3.    alloc()
  4.    free()
 Discuss Question
Answer: Option D. -> free()


Once this method is executed, the result set is no longer available.


Question 6. Which one of the following databases has PHP supported almost since the beginning?
  1.    Oracle Database
  2.    SQL
  3.    SQL+
  4.    MySQL
 Discuss Question
Answer: Option D. -> MySQL


MySQL


Question 7. In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced?
  1.    PHP 5.0
  2.    PHP 5.1
  3.    PHP 5.2
  4.    PHP 5.3
 Discuss Question
Answer: Option D. -> PHP 5.3


PHP required that MySQL client library be installed on the server from which PHP was communicating with MySQL, whether the MySQL server also happened to reside locally or elsewhere. PHP 5.3 removes this problem by introducing MySQL Native Driver.


Question 8. Which one of the following statements is used to create a table?
  1.    CREATE TABLE table_name (column_name column_type);
  2.    CREATE table_name (column_type column_name);
  3.    CREATE table_name (column_name column_type);
  4.    CREATE TABLE table_name (column_type column_name);
 Discuss Question
Answer: Option A. -> CREATE TABLE table_name (column_name column_type);


CREATE TABLE table_name (column_name column_type);


Question 9. The updated MySQL extension released with PHP 5 is typically referred to as..
  1.    MySQL
  2.    mysql
  3.    mysqli
  4.    mysqly
 Discuss Question
Answer: Option C. -> mysqli


The updated MySQL extension with PHP 5 is known as MySQL and typically referred to as mysqli.


Question 10. Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?
  1.    extension=php_mysqli.dll
  2.    extension=mysql.dll
  3.    extension=php_mysqli.dl
  4.    extension=mysqli.dl
 Discuss Question
Answer: Option A. -> extension=php_mysqli.dll


Also make sure that extension_dir directive points to the appropriate directory.


Latest Videos

Latest Test Papers