Hi Doug,
Try to use
insert into player_table(playerid, player_name) values (auto,
'$player_name);
Cheers,
Minh Dam
On Mon, 19 Feb 2001, Doug Linley wrote:
> I have a table that I created that has a primary key field that should be
> auto_incremented. To fill in this value I am calling
>
> insert into player_table(playerid, player_name) values (LAST_INSERT_ID() +
> 1, '$player_name');
>
> My problem is that I'm getting duplicated key values because last_insert_id
> is always 0. Anyone know what the problem might be? The field is indexed
> by the way.
>
> Thanks in advance for your help!
>
> Doug L.
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php