【发布时间】:2017-06-10 15:01:47
【问题描述】:
我正在尝试仅选择 500 MS 内的行,但我不确定仅使用 MySQL 是否可行?
我当前的代码是:
$stmt = $mysqli->prepare('SELECT chat_user, chat_msg FROM chat_msg
WHERE chat_id = ?
AND chat_time > (NOW() - INTERVAL 1 SECOND)
AND chat_user != ?');
我无法将它插入到代码块中。
【问题讨论】:
-
欢迎。看看stackoverflow.com/q/6102744/1415724 --- stackoverflow.com/q/2825838/1415724 --- stackoverflow.com/q/9624284/1415724 - 我认为最后一个可能是你最好的选择。