PaulRyan Posted February 19, 2011 Share Posted February 19, 2011 I have the following query: $getVideos = mysql_query("SELECT catergory, COUNT(catergory) as 'catCount' FROM videos GROUP BY catergory"); Using this in PHPMyAdmin returns the correct results of: catergory | catCount 0 | 7 1 | 1 10 | 2 How would get those results into a PHP array or what not...I have done this before but along time ago and cannot for the life of me remember how to do it. Hopefully someone can point me in the right direction? Regards, PaulRyan. Link to comment https://forums.phpfreaks.com/topic/228153-correct-query-retrieval-format-incorrect/ Share on other sites More sharing options...
litebearer Posted February 19, 2011 Share Posted February 19, 2011 This may help http://www.tizag.com/mysqlTutorial/mysqlgroupby.php Link to comment https://forums.phpfreaks.com/topic/228153-correct-query-retrieval-format-incorrect/#findComment-1176557 Share on other sites More sharing options...
PaulRyan Posted February 19, 2011 Author Share Posted February 19, 2011 Get fuxxored! Just needed to use while()...query was correct damn it! Thanks Litebearer! Regards, PaulRyan. Link to comment https://forums.phpfreaks.com/topic/228153-correct-query-retrieval-format-incorrect/#findComment-1176558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.