Hello everybody, there is a table containing a date field named "datum". I want to find out the rows containing a date BETWEEN two given dates.
And I do: SELECT * FROM table1 WHERE datum BETWEEN '0000-00-00' AND '2002-03-10'; This one does what it's supposed to do. But now I need to add one day to the start date on SQL level. So I do: SELECT * FROM table1 WHERE datum BETWEEN ('0000-00-00' + INTERVAL 1 DAY) AND '2002-03-10'; MySQL returns an empty result set, but it shouldn't (the table contains dates year 2000 and up. EXPLAIN SELECT * FROM table1 WHERE datum BETWEEN ('0000-00-00' + INTERVAL 1 DAY) AND '2002-03-10'; -> +-----------------------------------------------------+ | Comment | +-----------------------------------------------------+ | Impossible WHERE noticed after reading const tables | +-----------------------------------------------------+ ?????? Thanks for any advice, Felix --------------------------------------------------------------------- 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