SELECT * FROM `weibo_logs` where DATEDIFF( NOW(),date)=0 order by `date` desc limit 1
查询符合条件的weibo_user_id每天的一条数据
SELECT weibo_user_id, DATE_FORMAT(date,'%Y-%m-%d') FROM `text` where 'weibo_user_id'='{$source_account->id}' GROUP BY DATE_FORMAT(date,'%Y-%m-%d')
这样会有排序问题,那么就先排序
SELECT DATE_FORMAT(date,'%Y-%m-%d') as d
FROM (SELECT * FROM `text` ORDER BY date DESC) as s
where 'weibo_user_id'='{$source_account->id}'
GROUP BY DATE_FORMAT(date,'%Y-%m-%d')
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)