2012-02-26 32 views
-2

所有项目告诉我在哪里,什么为下面添加查询我需要证明,除了今天

$randitems = $DB->getAll("SELECT * FROM `" . DB_PREFIX . "items` a WHERE `enabled`=1 AND `visible`=1 $filter order by RAND() limit 7"); 
$smarty->assign("randitems", $randitems); 

回答

1

代码。如果你在你的items表中的列date,只需添加AND DATE(date_column) < DATE(NOW())到您的WHERE子句。

+0

是的,它的作品感谢您的帮助..... – 2012-02-26 04:42:13