bonked Posted June 21, 2007 Share Posted June 21, 2007 I created a whole system for a simple mock "bank" system. I keep getting errors about the connection. Take a look for yourself at http://lifesmessy.com/admin One of the major errors is: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/lifesmes/public_html/admin/index.php on line 267 does anyone know what this means? be sure to check the link i provided, as it may contain some clues for anyone that can help me. Thanks for everyones help, ~Bonked~ Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/ Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 mysql_fetch_array(): supplied argument is not a valid MySQL result resource sql statement is incorrect show me the statement Im pretty sure thats your prob ASTIG!!! Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279004 Share on other sites More sharing options...
bonked Posted June 21, 2007 Author Share Posted June 21, 2007 # while($r=mysql_fetch_array($qry)) <------ Line 267 # { # $totalbalance+=$r['balance']; # if($r['ip']=='') # { # $ip='Not logged.'; # $notlogged++; # } # else # { # $ip='<a href="http://www.dnsstuff.com/tools/ipall.ch?ip='.$r['ip'].'" target="_blank">'.$r['ip'].'</a>'; # } # $tmpqry=mysql_query('SELECT id FROM jobs WHERE userid='.$r['id'].' AND state=0 LIMIT 1'); # if(mysql_num_rows($tmpqry)) # { # $class='job'; # } If you want the whole document, which might actually be easier because the lines are labeled, go to http://pastebin.gaiatools.com/?show=101 - scroll down until you come to line 267. Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279006 Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 while($r=mysql_fetch_array($qry)) <------ Line 267 ya but the error are on the select statement $qry====where is this thing Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279009 Share on other sites More sharing options...
bonked Posted June 21, 2007 Author Share Posted June 21, 2007 lol, slower please, im a noob. I have no clue what you just said. Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279010 Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 while($r=mysql_fetch_array($qry)) <------ Line 267 $qry===this is the initialization of the query see it while($r=mysql_fetch_array(====$qry=====)) the error is that $qry theres something in there like $qry='SELECT * FROM ======'; ASTIG!!!!! Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279011 Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 your site is funny it has allot of jerks lol :-* :-* any way i found the header error there im sure youll ask that so now look at the pined topic about headers Link to comment https://forums.phpfreaks.com/topic/56490-help-errors-mysql_fetch_array/#findComment-279012 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.