![]() |
|||
PHP
IT Tags
photo gallery Solr XML magento ecommerce server shutdown sdf Remove Duplicate objects PHP and FLash multiple file uplo indexing solr include SimpleXML XHTML local server Simplexml Parser Combo box ajax check domain Stop Script associative arrays my_thread_global_end local server Mobile site Xampp Overlapping Layers connection to MYSQL php mail UPDATE control panel mysql server |
Auto_Increment ValueI 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. Commentsmysql_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. When I login to phpMyAdmin and view the table structure, a column `NextAutoIndex` is provided. This gave me the next sequence number for my Auto_Increment. All tables were the one-up number of the last record entered. This is correct and will prevent a new record from being rejected because of a duplicate Primary Key. |
