Re: Conditions in selects

2005-07-13 Thread zzapper
On Wed, 13 Jul 2005 00:34:15 -0400, wrote: Scott Haneda wrote: I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine It should, as that is correct syntax, as documented in the manual

Re: Conditions in selects

2005-07-13 Thread Michael Stassen
zzapper wrote: On Wed, 13 Jul 2005 00:34:15 -0400, wrote: Scott Haneda wrote: I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine It should, as that is correct syntax, as

Conditions in selects

2005-07-12 Thread Scott Haneda
I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine However, I was under the impression that BETWEEN was to be formatted BETWEEN(va1, v2) Which leads me to: SELECT IF(NOW()

Re: Conditions in selects

2005-07-12 Thread Michael Stassen
Scott Haneda wrote: I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine It should, as that is correct syntax, as documented in the manual