SELECT prod_name, sale_price, sale_schedule_status
FROM products 
WHERE NOW() NOT BETWEEN(sale_start AND sale_end)
AND sale_schedule_status = 'active';

I am betting this is just some parens I am missing, but the above, does find
the records where the date range in NOT BETWEEN the start and end, however,
it also finds records where the status is NOT 'active', which I don't want.


Swapping the order of the condition seems to give me an error as well, so I
am stumped.
-- 
-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
<http://www.newgeo.com>                     Novato, CA U.S.A.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to