Thiemos Archiv
- Wednesday, 2002-04-17 17:11
- What MySQL NOT can do:SELECT * FROM table IF(COUNT(*)<1, LIMIT 1, WHERE time>NOW()-INTERVAL 7 DAY)What I want to do is selecting the last entry plus all entries written in the last seven days. In one query, ofcourse. ;-)
SELECT * FROM table WHERE time>NOW()-INTERVAL 7 DAY OR time=MAX(time) Kommentare zu diesem Beitrag können per E-Mail an den Autor gesandt werden.