Jump to content

Need help with counting DB records


johnc71

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/118577-need-help-with-counting-db-records/
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.