www.webdeveloper.com
Results 1 to 3 of 3

Thread: mysqli - PHP Certification question

  1. #1
    Join Date
    Apr 2006
    Posts
    245

    mysqli - PHP Certification question

    I am currently studying towards my Zend PHP certification and have came across this question in my first practice exam:

    Consider the following code-snippet, which is taken from a larger application:

    PHP Code:
    <?php
    for(/* empty */ 
        
    mysqli_more_results($link); 
        
    mysqli_next_result($link))
    {

      if(
    $result mysqli_store_result($link))
      {
        while(
    $row mysqli_fetch_array($resultMYSQLI_ASSOC))
        {
          foreach(
    $row as $value)
          {
            print 
    "$value\n";
          }
        }
        
    mysqli_free_result($result);
      }
    }
    ?>
    Can anyone advise - this is an example of doing what using the new MySQLi extension?

    The possible answers are:

    Performing a multi-query statement
    Performing a transaction
    Using an unbuffered queries
    Prepared Statements
    Using buffered queries

    Many thanks,
    Picco

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Looks like option #1 to me, "Performing a multi-query statement."

    See: mysqli::multi_query().
    Last edited by Jona; 04-21-2010 at 05:10 PM.
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,248
    Hint: read up on mysqli::more_results().
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles