MySQL Forums
Forum List  »  Newbie

Need Help with a Select Query
Posted by: Jim Joyner
Date: May 04, 2005 01:28PM

Hello all, first post here.

Trying to do a fairly simple select query to a MySql dbase via ASP on a web page.

It works in MSAccess, not sure why I can't get it to work.

Select date_format(joindate,'%Y') as jyear, date_format(joindate,'%m') as jmonth, count(joindate) as jcount
from TableName
Group By jyear, jmonth
Order by jyear, jmonth

This returns no records.

However, if I take the statement "count(joindate) as jcount" out, it returns the correct data for jyear and jmonth.

I've done lots and lots of searching on this site and can't for the life of me get this to work. I'll buy a virtual beer for whomever can get this to work for me!

Jim in Montana

Options: ReplyQuote


Subject
Written By
Posted
Need Help with a Select Query
May 04, 2005 01:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.