Need help with Auto_Increment MYSQL!
#2

This is NOT the way to load stuff, that's incredibly inefficient. Get rid of the "where idbiz=" part and load the resultset at once. What do you think the "row" variable is for?

This is also NOT what an auto_increment is for. AI solely exists to uniquely identify each row. You should add a variable to your biz enum to store the SQL id. Then use that variable to update the corresponding row.

So it could end up like this:
Код:
Internal ID | SQL auto_increment
0|1
1|2
2|4
3|5
4|7
5|8
Now if I want to update biz 3, I grab the variable and see that it corresponds with SQL id 5. I use that number to update the corresponding row.
Reply


Messages In This Thread
Need help with Auto_Increment MYSQL! - by dieuhanhphuc - 15.07.2014, 09:53
Re: Need help with Auto_Increment MYSQL! - by Vince - 15.07.2014, 10:54
Re: Need help with Auto_Increment MYSQL! - by dieuhanhphuc - 15.07.2014, 13:51

Forum Jump:


Users browsing this thread: 1 Guest(s)