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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.