Qmail,
Monday, October 28, 2002, 11:48:14 AM, you wrote:

QL> Is it true that the date_sub function(s) will only work on datetime column
QL> types?

QL> SELECT count(id) as id FROM messages WHERE client_id = '2' AND datetime_col
> date_sub(NOW(),interval 1 day)

QL> To get the above query to work, I had to change my datetime_col column from
QL> timestamp to datetime, and that breaks A LOT of formatting work I had done
QL> previously when I thought I was only going to be able to keep with a
QL> timestamp column type.

QL> Could someone suggest a replacement query for the one above, where I would
QL> not have to change my datetime column from timestamp to datetime?

DATE_SUB works perfect on my TIMESTAMP column. So, what exactly
doesn't work for you?



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
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

Reply via email to