Jump to content

Sum of the # of fields in a table


zang8027

Recommended Posts

I have a table set up like the following:

 

-------------------------

comments_table

-------------------------

ID | Comment    | picID

-----------------------------

1  | lorum ipsum | 54

2  | lorum ipsum | 36

3  | lorum ipsum | 54

 

 

If i wanted to find out how many records had the picID of 54, how could i get that?  I want the final result to be like:

 

The total number of records is 2.  Which of course i can implant easily into php

Link to comment
https://forums.phpfreaks.com/topic/196417-sum-of-the-of-fields-in-a-table/
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.