29.05.2017, 22:42
Let me take a different approach since you're not doing things right, or understand how you should use the businesses' SQL IDs and array IDs (ignore what I said previously since you should edit your code to do things properly - read below).
The SQL ID of a business doesn't need to match its array ID, the array ID is just to locate the business' stored information within the script in runtime or however you want to see it, the SQL ID is the identifier of the business within your database. The SQL ID should only be used to UPDATE, INSERT INTO or SELECT from your database.
The SQL IDs don't need to be consecutive (1, 2, 3, 4, 5), reordering them should not be a concern.
The SQL ID of a business doesn't need to match its array ID, the array ID is just to locate the business' stored information within the script in runtime or however you want to see it, the SQL ID is the identifier of the business within your database. The SQL ID should only be used to UPDATE, INSERT INTO or SELECT from your database.
The SQL IDs don't need to be consecutive (1, 2, 3, 4, 5), reordering them should not be a concern.

