RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

Join Date: Apr 2005
Location: Auckland, New Zealand
Posts: 136
Reputation: sarahk is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
sarahk's Avatar
sarahk sarahk is offline Offline
Junior Poster

Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resou

  #2  
Oct 17th, 2005
It's probably not a php version problem

usually $sql and $query are the same thing and you use $result for the result set. That improves readability but doesn't fix anything

$result = mysql_query($query) or die(mysql_error() . '<br />'. $query);
     
while($row = mysql_fetch_array($result)){
 var_dump($row);
}

this should show where the problem is.

If it's the query paste it into phpMyAdmin and see the errors there. It may be something simple like a missed quote mark or a column in the table.

Sarah
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:58 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC