I have a MySQL table with an auto-increment ID field. I'm filling the table with data from one source, with its own unique ID (starting from around 4 million up). I also want to insert my own data but don't want it to conflict with the IDs already in the database.
Ideally I'd just insert it all at a lower ID. However, I have to use a function outside of my control (a built-in Joomla function) which will insert a new row if the ID is 0, but try and update it if it's any other number.
So obviously if I try and insert a new row with and ID of 1, it will try to update the row with ID of 1, which doesn't exist. So no data gets inserted.
I've tried setting the auto-increment value lower than the current max id but it doesn't work. Is there another solution to my problem?
UPDATE: To try and clarify my question, I have data from another source with a high ID (from 4 million and increasing). I want to insert rows with a low ID, from 1 and up (the external source will not conflict with this). However, for the reasons described above, I can't just find an unused low ID and use that, I have to either use zero or find some other solution.