In the following example, does the while loop with mysql_fetch_array() query
the server each time through the loop?  Or does it do everything, while
parsing, using $result?  Or is there some other subtlety I'm missing?  How
is this working and where is the work being done?

Thanks, Glenn.

mysql_connect($host, $user, $password);
$result = mysql_query("select user_id, fullname from table");
while ($row = mysql_fetch_array($result)) {
   echo "user_id: ".$row["user_id"]."<br>\n";
   echo "user_id: ".$row[0]."<br>\n";
   echo "fullname: ".$row["fullname"]."<br>\n";
   echo "fullname: ".$row[1]."<br>\n";

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to