This question shows research effort; it is useful and clear
-2
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我想获取某个日期间隔之间的所有行,结果集最多为 50 条记录。可以查询什么?我不断收到错误:
$sql = "SELECT DISTINCT userId FROM ".$TableName.
" where time BETWEEN (NOW() - INTERVAL "
.$USER_COUNT_DURATION.
" MINUTE AND NOW()) LIMIT 0, ".$limit." ;";
$sql = "SELECT DISTINCT userId FROM ".$TableName." where time BETWEEN (NOW() - INTERVAL ".$USER_COUNT_DURATION." MINUTE) AND NOW() LIMIT 0, ".$limit." ;";