ballhogjoni Posted February 2, 2008 Share Posted February 2, 2008 I have this code here, but it only shows the first record in the db. I know there are multiple records that meet this criteria. What am I doing wrong? $query = mysql_query("SELECT email, fname, lname FROM pageOneInfo_Test WHERE date = '".$date."' AND soldProductTo = '0'") or die(mysql_error()); $row = mysql_fetch_array($query); echo $row['email'].'<br>'.$row['fname']; Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 2, 2008 Share Posted February 2, 2008 You need to throw it in a while statement. <?php $query = mysql_query("SELECT email, fname, lname FROM pageOneInfo_Test WHERE date = '".$date."' AND soldProductTo = '0'") or die(mysql_error()); while($row = mysql_fetch_assoc($query)){ extract($row); echo $email.'<br>'.$fname; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.