19.01.2019, 11:06
Hello guys, I have a question about MySQL inserting. I'm creating a house system. In my create house command I need to set the house's ID, but the problem is that I don't know how to check the next id of the house like in the table are:
1
2
3
5
IDS (without 4 because it's deleted) insert the house as ID 4.
I tried to count the lines (cache_num_rows()), but if I count them now it will make the new house with ID 5 in this case and there will be 2 houses with ID 5
I hope you understand me, sorry for my bad English!
1
2
3
5
IDS (without 4 because it's deleted) insert the house as ID 4.
I tried to count the lines (cache_num_rows()), but if I count them now it will make the new house with ID 5 in this case and there will be 2 houses with ID 5
I hope you understand me, sorry for my bad English!