E.g: New user register in USERS_TABLE table and other remove account (with MOD). If user remove, user_id remove. If user_id remove, this is right for auto_increment - is work + 1 of each new field add but order value is break. Jan method is get last value insert and add + 1 for insert. + 1 is no add 1 of auto_increment. Is add 1 of total count of SELECT MAX function of SQL.
Ok...
- SELECT MAX is getting the highest user_id that exists. Then Jan added + 1... right?
- If you delete the previous added user then the new user will get the same id, because of the function above... right?
- auto_increment will also work, but "order value" will break ... which "order value" do you mean? Is this critical?
- i deleted the whole function and just left out the "user_id" field at the database insert so that its given an auto_increment value. After that i fetched the given id with the get_insert_id function - is this ok?
- are there other disadvantages?
I´m asking because further modifications may include this way of adding the new user to the db and i don´t want to make it buggy. If you know another way which avoids that different users will get the same id (not at the same time, but still the same id) then please share it with me.
"// Is work for
next_id method."
Don´t know what this means...
Sorry, but it´s hard for me to understand your english.
Regards Maik