-do you have any index covering this query? -this is not a good practice to have function call(s) in the where clause, since mysql will make the fucntion call for every rows scanned. select count(*) as c from users_table where user_regdate > "2002-06-01 00:00:00" -furthermore, in the where clause, >= is always better than >. select count(*) as c from users_table where user_regdate >= "2002-06-01 00:00:01"
andy wrote: > > Hi there, > > I would like to count the users out of a mysql db who registered after a > certain date. > > The column I have in the db is a char and I do not want to change this > anymore. > This is how a typical entry looks like: May 29, 2002 > > This is how I tryed it: > > // while '10...' is unix timestamp june 1, 02 > SELECT COUNT(*) AS c > FROM users_table > WHERE UNIX_TIMESTAMP( user_regdate ) > '1022882400' > > Thanx for any help on that, > > andy > > query > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Sammy Lau mailto: [EMAIL PROTECTED] - Tell me what you want and I'll tell you how you can live without it. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php