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 表,点击一个 API,然后将结果写入一个表。
最初我使用的是:
$select = "SELECT Partner, Merchant, IP FROM " .$old_table. " WHERE ID >= " .$startRow; mysqli_query($db, $select);
这很好用,但后来我意识到我拥有的所有表可能都没有连续的 ID 号,甚至根本没有 ID 号。
有没有办法从没有 ID 号的特定行开始?
SQL 中的行不一定按顺序排列。因此,如果没有顺序 ID(或其他标识符,如日期),就无法在某个点之后获取所有行。
所以,不,你不能从一个特定的行开始,而没有一种方法来识别它,并识别应该在它之后的行。