johnc71 Posted August 7, 2008 Share Posted August 7, 2008 Ok, I am so tired right now and my brain is not cooperating... what I am trying to do is basically is count number of "type" records in first table and display them just like in table two. I was able to do this by running separate queries for each "type" and using mysql_num_rows to count results but there must be an easier way to do this. I tried Count and Group queries but without success... Any help is greatly appreciated! iduserdatetype 1john2008-08-01pdf 2mary2008-08-02pdf 3mary2008-08-03print 4david2008-08-03ppt 5david2008-08-04pdf 6john2008-08-04print 7david2008-08-05ppt 8mary2008-08-05ppt 9john2008-08-05ppt 10john2008-08-05pdf userprintpdfppt john121 mary111 david[/td][td]12 Quote Link to comment Share on other sites More sharing options...
fenway Posted August 7, 2008 Share Posted August 7, 2008 These is classic "cross-tab" or "pivot-table"... 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.