MySQL / PHP Help.

Status
Not open for further replies.

NSA

sudo apt-get thefuckout.tar.gz
Dec 9, 2011
715
86
Hello,

I can't really explain this without description so here goes.

I need to have a year (2013), a month (January) and a user (Josh).
I have a big database and I want to see how many jobs Josh did throughout the month January of 2013.
Here's my current query:
PHP:
SELECT Day( closed ) as D, COUNT( closed ) AS c
FROM ost_ticket
WHERE YEAR( closed ) = '2013' AND MONTHNAME( closed ) = 'January' AND source = '" . $user . "'
Group By D
LIMIT 0 , 30

The problem is, it doesn't seem to be the same as a normal query, as I cannot echo $row data because this happens:

Capture.png


I need to list how many jobs Garry, Adam and Anthony did, but it's going crazy.
 
Status
Not open for further replies.

Users who are viewing this thread

Top