View Single Post
Old 12-27-2012, 10:04 AM  
Webmaster Advertising
So Fucking Banned
 
Join Date: Sep 2003
Posts: 1,360
SQL fetch Errors?

Could one of the programming types give me a hand with this error that i am getting running a script on my server...

Quote:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/r3ading/public_html/admin/sets.php on line 175
Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/r3ading/public_html/admin/sets.php on line 206
Here are the 2 lines of code it is telling me are faulty but i dont see *why* because the script works perfectly on another server...

174 & 175 line:
Code:
$query="SELECT COUNT(*) FROM $table_name";
list($total_links)=mysql_fetch_array(mysql_query($query));
203 to 207 lines:
Code:
$i=0;
$res=mysql_query($query);
echo "<td>";
while($r=mysql_fetch_array($res))
{
 $i++;
 $id=$r['id'];
 $dir_name=$r['dir_name'];
 $thumb=displayThumb($dir_name,$r['thumb']);
Any help you could offer would be appreciated, ive been on with my hosting tech support a few times about this but theyre telling me it a 'code' issue not a server issue, but i *know* for a fact this program works 100% on another server but they wont hear any of it
Webmaster Advertising is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote