MySQL Forums
Forum List  »  PHP

Re: Returing multiple rows based on 2 criteria
Posted by: Barry Galbraith
Date: December 09, 2012 11:06PM

>when i use mysql_fetch_array

Call it over and over until it returns false, Then you have every row it returned.

while ($row = mysql_fetch_array($result)){
  $var1 = $row['column1'];
  $var2 = $row['column2'];
 // the loop will continue while there are more rows.
  // do something with the vars returned at each iteration
}

Good luck,
Barry.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.