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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.