Assuming that tim is a pure timestamp column then try
select * from table where date_format(tim,'%Y-%m-%d) >= DATE_SUB(curdate(),
INTERVAL 7 DAY)
Bastien
From: "Muhammad Mustafa" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] how to show all recorde
hey guys
i want to know how to show all records inserted in the last 7 days in a
table
i use this query to show the last 10 articles from a table called - articles
- where time is saved in the vairble - $tim - down is the query:
$SQL = '' . 'SELECT * FROM articles WHERE category=\'' . $_GET['c