mysql_fetch_array() error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Jeefo
Forum Newbie
Posts: 16
Joined: Thu Jun 16, 2005 3:38 pm
Location: Tokyo, Japan

mysql_fetch_array() error?

Post by Jeefo »

I have this script but every time it gives me this:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /drive2/fpgshttpd/jeefo/comments.php on line 39

Line 39 in the script is:

Code: Select all

$html[] = 'Posted by: ' . $a['author'] . ' on ' . date('M j, Y :: h:ia', $a['time']) . '<br />' . $a['comments'];
What's wrong with it? 8O
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's not line 39 ;)

you likely have an error in you SQL query syntax. Post more code, echo out the query string you send to MySQL making sure it's syntacticaly correct.
Post Reply