Jump to content

Query Error


liamoco

Recommended Posts

This is the error is am getting

 

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\server\xampp\htdocs\php\home\chats\home-chats.php on line 58

 

And this is the query

 

$popularToday_query = mysql_query("SELECT round(avg(likes)) + round(avg(favourites)) as rating, chat_name
                                   FROM chat_likes
		           GROUP BY chat_name 
	                   WHERE timeRated >= ".$curTime."
		           ORDER BY rating DESC 
	        	   LIMIT 4");

 

I have triple checked that I have all the field names correct, what am I doing wrong?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/221051-query-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.