Fetch two mysql resource in while loop

From: Date: Thu, 17 Jun 2004 03:26:29 +0000
Subject: Fetch two mysql resource in while loop
Groups: php.db 
Request: Send a blank email to php-db+get-34821@lists.php.net to get a copy of this message
Hi all: i worte a piece of code like this
     $result1 = mysql_query(query1);
      $result2 = mysql_query(query2);
      while($row1=mysql_fetch_row($result1) && $row2=mysql_fetch_row($result2)){
............} only $row2 is initazlied. row1 is always empty. if i change it like this while($row1=mysql_fetch_row($result1)){ $row2=mysql_fetch_row($result2) .......} there will be no problem and both $row1 and $row2 contain values. can anyone tell me why? is it i worte something wrong?
                                                            sam


« previous php.db (#34821) next »