开发者

Querying mysql table for times after the current one

开发者 https://www.devze.com 2023-01-11 19:41 出处:网络
I have a table with 1 column (bus departure times in format \"14:32:15\"). How to query the table to show only departures that are after the c开发者_StackOverflowurrent moment (after curtime())?

I have a table with 1 column (bus departure times in format "14:32:15"). How to query the table to show only departures that are after the c开发者_StackOverflowurrent moment (after curtime())?

E.g.: if it's 12 o'clock and my table has rows (10:15:00,11:20:00,12:30:00, ...), I want to have 12:30:00 returned.


Try this SELECT time FROM yourtable WHERE time > now()

0

精彩评论

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