Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 07-29-2004, 09:41 AM   #1 (permalink)
 
Junior Techie

Join Date: Mar 2004

Posts: 56

hooloovoo

Default MySQL errors. please help

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

I keep getting the above error when entering the below code.

$result = mysql_query("SELECT , Message FROM LatestNews");
while ($row = mysql_fetch_array($result))
{
print "Message:".$row{'Message'}."
";
}


can anyone help?
hooloovoo is offline  
Old 07-29-2004, 05:01 PM   #2 (permalink)
 
True Techie

Join Date: Apr 2004

Posts: 168

nak-1

Default

Remove the comma from the line:

$result = mysql_query("SELECT , Message FROM LatestNews");

so it reads:

$result = mysql_query("SELECT Message FROM LatestNews");
__________________
--------------------

Nak

Is it just me, or does something smell suspicious about all this?
nak-1 is offline  
Old 07-29-2004, 05:10 PM   #3 (permalink)
 
Junior Techie

Join Date: Mar 2004

Posts: 56

hooloovoo

Default

duuurrrrrrr

Thanks for pointing out my stupidity. Its there as there were more fields, which were removed, but didnt remove the comma. Id have been on forever and not spotted that.

thanks
hooloovoo is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On