开发者

Timestamp before now?

开发者 https://www.devze.com 2023-04-13 07:12 出处:网络
Quite simply, I have the following query $q = \"SELECT fixture_date FROM \".TBL_FOOT_GAMES.\" WHERE leagueid = \'$league_id\' AND (type = \'2\' O开发者_如何学PythonR type = \'12\' OR type = \'22\' OR

Quite simply, I have the following query

$q = "SELECT fixture_date FROM ".TBL_FOOT_GAMES." WHERE leagueid = '$league_id' AND (type = '2' O开发者_如何学PythonR 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 :)


WHERE fixture_date < NOW();

That what you're going for? timestamps can be compared like any other data type.


WHERE fixture_date < NOW(); That should do it :)

0

精彩评论

暂无评论...
验证码 换一张
取 消