Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是否可以使用 MySQL 从特定行到表末尾选择,而不知道还剩多少行?
我目前的查询是:
SELECT * FROM updates WHERE userid='$fid' ORDER BY up_id DESC
但我希望能够做到:
SELECT * FROM updates WHERE userid='$fid' ORDER BY up_id DESC LIMIT '$myRow' to EndOfTable
这可以做到吗?
只需使用一个比表格更大的值,例如 999999999。所以:
limit $myRow, 999999999
虽然不太受欢迎,但我更喜欢以下语法:
limit 999999999 offset $myrow