MySQL errors. please help

Status
Not open for further replies.

hooloovoo

Baseband Member
Messages
56
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?
 
Remove the comma from the line:

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

so it reads:

$result = mysql_query("SELECT Message FROM LatestNews");
 
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
 
Status
Not open for further replies.
Back
Top Bottom