Zepo. Posted December 23, 2007 Share Posted December 23, 2007 $apps = mysql_query("SELECT signupid,name.gamename,sn,email,pass,position,info,time,ip FROM apply"); while ($apps = mysql_fetch_array($apps)){ Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource. The loop works, its just that it gives that warning.... Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/ Share on other sites More sharing options...
redarrow Posted December 23, 2007 Share Posted December 23, 2007 wht this part mate is it a join name.gamename Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421472 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 $apps = mysql_query("SELECT signupid,name,gamename,sn,email,pass,position,info,time,ip FROM apply"); while ($apps = mysql_fetch_array($apps)){ Sorry. Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421475 Share on other sites More sharing options...
MadTechie Posted December 23, 2007 Share Posted December 23, 2007 try this <?php $apps = mysql_query("SELECT signupid,name,gamename,sn,email,pass,position,info,time,ip FROM apply") or die(mysql_error()); while ($apps = mysql_fetch_array($apps)){ ?> whats the error ? Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421476 Share on other sites More sharing options...
redarrow Posted December 23, 2007 Share Posted December 23, 2007 add this please sorry i got beat lol <?php $apps = mysql_query("SELECT signupid,name,gamename,sn,email,pass,position,info,time,ip FROM apply")or die(mysql_error()); // if a error show it..... echo $apps; // if the error dosent show cheek query while ($apps = mysql_fetch_assoc($apps)){ ?> Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421477 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 It doesnt die, and it echos Resource id #9 Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421482 Share on other sites More sharing options...
redarrow Posted December 23, 2007 Share Posted December 23, 2007 try <?php $apps = mysql_query("SELECT `signupid`,`name`,`gamename`,`sn`,`email`,`pass`,`position`,`info`,`time`,`ip` FROM `apply`")or die(mysql_error()); // if a error show it..... echo $apps; // if the error dosent show cheek query while ($apps = mysql_fetch_assoc($apps)){ ?> Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421488 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 No difference. The weird part is that its actually working, just coming up with that error though. Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421491 Share on other sites More sharing options...
redarrow Posted December 23, 2007 Share Posted December 23, 2007 try assoc not array Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421492 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 I did, nothing. Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421493 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 Bump. Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421511 Share on other sites More sharing options...
MadTechie Posted December 23, 2007 Share Posted December 23, 2007 lol, i should of noticed.. try changing to <?php $mySQL = mysql_query("SELECT signupid,name,gamename,sn,email,pass,position,info,time,ip FROM apply")or die(mysql_error()); while ($apps = mysql_fetch_assoc($mySQL)){ ?> Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421512 Share on other sites More sharing options...
Zepo. Posted December 23, 2007 Author Share Posted December 23, 2007 Yup worked, that makes since to me now, defining a query to the same thing thats an array. Gotcha, thanks. Link to comment https://forums.phpfreaks.com/topic/82872-solved-loop-error/#findComment-421519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.