Results 1 to 2 of 2
Jun 24, 2013, 08:00 #1
- Join Date
- Feb 2006
- Chepstow, South Wales
- 0 Post(s)
- 0 Thread(s)
Select count id and then select another column
I'm trying to count id's of a certain query but I need also to select another column.
I have the code below, but its not working.
<div id="other-Reports-This-Month"> <? $a=mysql_query("select x.countt, DateOccured from hazzard, (select count(UniqueIdentifier) as countt FROM hazzard) where WHERE MONTH(DateOccured) = ".date('m')." AND YEAR(DateOccured) = ".date('Y')." AND seenByManager=0"); $data=mysql_fetch_assoc($a); //echo $data['total1']; ?> <p><strong>Other Reports This Month: <span style="font-size:14px; font-weight:normal; vertical-align:2px; color:#71A6D4">[<? echo $data['countt'] ?>]</span></strong></p> </div>