maettig.com

Thiemos Archiv

What MySQL NOT can do:
SELECT * FROM table IF(COUNT(*)<1, LIMIT 1, WHERE time>NOW()-INTERVAL 7 DAY)
SELECT * FROM table WHERE time>NOW()-INTERVAL 7 DAY OR time=MAX(time)
What I want to do is selecting the last entry plus all entries written in the last seven days. In one query, ofcourse. ;-)

Kommentare zu diesem Beitrag können per E-Mail an den Autor gesandt werden.

[ ← Zurück zur Übersicht ]

Impressum & Datenschutz