karimali831 Posted May 1, 2010 Share Posted May 1, 2010 Hi, When I execute this query from phpmyadmin: SELECT cupID FROM cup_clans WHERE clanID='1' AND 1on1='1' It selects two rows from the cupID column which works fine. And for php: $isuser = safe_query("SELECT cupID FROM cup_clans WHERE clanID='1' AND 1on1='1'"); $dp=mysql_fetch_array($isuser); echo $dp['cupID']; echo's only one ID.. and not both? I don't understand why? I want it to echo all rows in the cupID column. Link to comment https://forums.phpfreaks.com/topic/200374-fetch-problem/ Share on other sites More sharing options...
JAY6390 Posted May 1, 2010 Share Posted May 1, 2010 You need to loop for each result while($dp=mysql_fetch_array($isuser)) { echo $dp['cupID']; } Link to comment https://forums.phpfreaks.com/topic/200374-fetch-problem/#findComment-1051550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.