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.
嗨,我想限制我的 SQL 查询,但如果我限制它,一切都会混淆,我不知道限制需要什么值。是否可以将其限制为特殊列?
$sql = "从 number1 中选择 number1.number1, number2.number2, number3.number3, number2, number3 LIMIT $_SESSION[startwert],$_SESSION[zielwert]"; $qry = mysql_query($sql,$db);
如果未ORDER BY指定子句,LIMIT则将按与存储行相同的顺序检索行,如果您不希望这样做,您可以ORDER BY在LIMIT
ORDER BY
LIMIT
像:
SELECT number1.number1, number2.number2, number3.number3 FROM number1, number2, number3 ORDER BY number1.number1, number2.number2, number3.number3 LIMIT $_SESSION[startwert],$_SESSION[zielwert]