时间戳早于现在?
很简单,我有以下查询
$q = "SELECT fixture_date FROM ".TBL_FOOT_GAMES." WHERE leagueid = '$league_id' AND (type = '2' OR type = '12' OR type = '22' OR type = '32') GROUP BY fixture_date ORDER BY fixture_date";
,我需要在 fixture_date
(时间戳)上添加 WHERE
。 where 必须在当前时刻之前。
有什么想法吗? 谢谢 :)
Quite simply, I have the following query
$q = "SELECT fixture_date FROM ".TBL_FOOT_GAMES." WHERE leagueid = '$league_id' AND (type = '2' OR type = '12' OR type = '22' OR type = '32') GROUP BY fixture_date ORDER BY fixture_date";
I need to add a WHERE
on fixture_date
which is a timestamp. The where needs to be before the current moment in time.
Any ideas?
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这就是你要去的目的?时间戳可以像任何其他数据类型一样进行比较。
That what you're going for? timestamps can be compared like any other data type.
WHERE 固定日期 <现在();
应该可以做到这一点:)
WHERE fixture_date < NOW();
That should do it :)