Michael Pakay wrote: > > > I recently changed hosting companies and recreated my MySQL database > with all tables and data. Several tables use an Auto_Increment field > as my PrimaryKey, (one up increment) > > How can I determine the next value to make sure the trigger was not > reset to 0 which will create a duplicate Primary Key, rejecting the > record? I'm using phpMyAdmin from the cpanel. > > Any help will be appreciated.
mysql_insert_id will tell you what the last entry was. To my knowledge, there is nothing that will tell you what the next id will be. There is no reason that the increment will return to 0 unless you truncate the table or you are using your own programatic incrementer instead of mysql's auto_increment. Billy P.