Jump to content

[SOLVED] SELECT error


timmah1

Recommended Posts

Why is this giving my the error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/home/thegr418/public_html/core/test.php on line 15

 

I see this and I automatically think that the database connection isn't correct, but everything is correct, and there are items in the table

 

Here is the code

$q = "SELECT * FROM blogs ORDER BY rand(".date('d').") LIMIT 5"
or die("There is a problem selecting the blogs ".mysql_error());
$a = mysql_fetch_assoc($q);

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/135370-solved-select-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.