I’m writing a code which looks up a MYSQL table, hits an API and then writes the result to a table.
Initially I was using:
$select = "SELECT Partner, Merchant, IP FROM " .$old_table. " WHERE ID >= " .$startRow;
mysqli_query($db, $select);
This worked well, but then I realized all the tables I have may not have sequential ID numbers, or even ID numbers at all.
Is there a way to start at a specific row without ID numbers?
Rows in SQL aren’t necessarily in order. So without a sequential ID (or other identifier, like a date), there’s no way to get all rows after a certain point.
So, no, you can’t start at a specific row without a way to ID it, and IDing the rows that should come after it.