emjez15 Posted January 21, 2011 Share Posted January 21, 2011 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 for the Date Range Specified Above to be : Complainant---Incident Count MarkGreen--------------3 Jha Ogbac --------------4 Peter Luciano --------- 10 Donald Guerero ------ 20 Quote Link to comment https://forums.phpfreaks.com/topic/225201-how-do-i-count-how-many-times-each-entry-in-a-column-appears/ Share on other sites More sharing options...
kickstart Posted January 21, 2011 Share Posted January 21, 2011 Hi Something like this SELECT Complainant, COUNT(incidentid) FROM incidents WHERE incidentcreateddate BETWEEN '$datefrom' AND '$dateto' GROUP BY Complainant All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/225201-how-do-i-count-how-many-times-each-entry-in-a-column-appears/#findComment-1163310 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.