Hi all, this one is killing me slowly, and I have read 2 full pages of hold threads on the Auto-Increment issue and nothing.
My problem is this: I have a database with a primary key which is also the auto_increment field, this works fine, but I need to know the auto_increment value that MySQL holds internally, the LAST_INSERT_ID() function is no good for my case since I need this value to be inserted and not after, also tried the "SELECT MAX(fld_HAM_ID) FROM tbl_HAM;" this gives the last assigned value, I thought great I just need to add 1 to this and it's done, but no, if some records are deleted at the end of the RS then it would give me value 13 I add 1 = 14 but the auto_increment is going to be 16, this is what I need to know, the increment value that MySQL holds internallly.
Thanks.
---------------------------------------------------------------------
If you haven't heard of it, then you most likely don't need it.
---------------------------------------------------------------------
My problem is this: I have a database with a primary key which is also the auto_increment field, this works fine, but I need to know the auto_increment value that MySQL holds internally, the LAST_INSERT_ID() function is no good for my case since I need this value to be inserted and not after, also tried the "SELECT MAX(fld_HAM_ID) FROM tbl_HAM;" this gives the last assigned value, I thought great I just need to add 1 to this and it's done, but no, if some records are deleted at the end of the RS then it would give me value 13 I add 1 = 14 but the auto_increment is going to be 16, this is what I need to know, the increment value that MySQL holds internallly.
Thanks.
---------------------------------------------------------------------
If you haven't heard of it, then you most likely don't need it.
---------------------------------------------------------------------