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 选择,我需要在其中获取列等于 1100 - 1400 的值的所有行。问题是我也通过 IN 获取值。
我的代码:
$sql="SELECT * FROM places WHERE number IN (3500, 2950, 2942, && 1100-1400 )";
但它并没有给我从 1100 到 1400 的所有结果。
我希望some1可以帮助我。
此致,
泰勒品牌
您可以将两个条件分开(用OR):
OR
WHERE number IN (3500, 2950, 2942) OR number BETWEEN 1100 AND 1400