MCQs > IT & Programming > LAMP > Select the while condition from the following options: $db = mysql_connect('localhost','root'); mysql_select_db('mydb',$db); $result = mysql_query('select state_id, state_text from states'); if ($result) { echo ''; }

LAMP MCQs

Refer to the code given below and select the while condition from the following options:

$db = mysql_connect("localhost","root");
mysql_select_db("mydb",$db);
$result = mysql_query("select state_id, state_text from states");
if ($result)
   {
   echo "<SELECT NAME='state_id'>";
   while (...condition...)
      {
      echo "<OPTION VALUE=\"".$myrow["state_id"]."\">".
           $myrow["state_text"]." </OPTION> ";
      }
   echo "</SELECT>";
   }

Answer

Correct Answer: $myrow = mysql_fetch_array($result)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

LAMP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

LAMP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it