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.

Thanks for all the help.

m




--- In php-list@yahoogroups.com, "Michael Pakay" <[EMAIL PROTECTED]> wrote:
>
> Thank you.
> 
> 
> 
> --- In php-list@yahoogroups.com, William Piper <billy@> wrote:
> >
> > 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.
> >
>


Reply via email to