Mr Chris Posted October 23, 2009 Share Posted October 23, 2009 Hi All, I have a wierd problem with a count query: <?php $SQL = mysql_query("SELECT sum(pictures_taken) as no_pics FROM event_data WHERE $the_query AND event_publication = '6' AND unix_timestamp(event_date) < unix_timestamp(NOW()) AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= event_date"); $row = mysql_fetch_array($SQL); echo "".$row['no_pics']."\n"; ?> However, sometimes I get a value returned, but sometimes no value is returned. It seems to have most difficulty when the Value returned from the count is 0. Can anyone help? Link to comment https://forums.phpfreaks.com/topic/178712-help-with-count/ Share on other sites More sharing options...
nadeemshafi9 Posted October 23, 2009 Share Posted October 23, 2009 need more info Link to comment https://forums.phpfreaks.com/topic/178712-help-with-count/#findComment-942709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.