CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How do I count how many times each entry in a column appears?

Print topic Send  topic

Author Message
kinsesyete

Posts: 9
Posted: 01/21/2011, 4:53 AM

I have this FPDF Report codes

MY SQL Syntax:

$sql="SELECT * FROM incidents WHERE incidentcreateddate BETWEEN '$datefrom' AND '$dateto' ORDER BY incidentid ASC" or die("cannot connect server ");

I want this entries to be

Complainant---Incident Count
MarkGreen--------------3
Jha Ogbac --------------4
Peter Luciano --------- 10
Donald Guerero ------ 20
View profile  Send private message
Waspman

Posts: 948
Posted: 01/21/2011, 8:02 AM

Report builder?
_________________
http://www.waspmedia.co.uk
View profile  Send private message
damian

Posts: 838
Posted: 01/21/2011, 9:41 PM

SELECT DISTINCT range_name, count( range_name ) AS count
FROM `range`
GROUP BY range_name
_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
damian

Posts: 838
Posted: 01/21/2011, 9:43 PM

  
$sql="SELECT DISTINCT *, count(Complainant)   
FROM incidents   
WHERE incidentcreateddate BETWEEN '$datefrom' AND '$dateto'   
ORDER BY incidentid ASC"   
or die("cannot connect server ");  

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.