20,359
社区成员
发帖
与我相关
我的任务
分享
$sql='select a.id,nav,title,attr,color,date
from mall_article a
where 5 > (select count(*) from mall_article b where nav = a.nav and date > a.date and nav in(79,78,1))
and nav in(79,78,1)
order by a.date DESC';
$sql2='SELECT id,title,attr,color FROM mall_article order by rand() limit 5;';
select id,nav,title,attr,color,date
from mall_article
where nav in(79,78,1)
order by rand() limit 5