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
>
>
Hi,
Your are using LAST_INSERT_ID wrong. You should just do:
insert into player_table(player_name) values ('$player_name');
And then use LAST_INSERT_ID to find out what player_id was assigned.
Although "LAST_INSERT_ID() + 1" will give you "your last value +1", another
client might already have
On Mon, Feb 19, 2001 at 05:33:00PM -0500, 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');
>
If you have the field set as auto_increment the you don't need to do
anything else. Let nature take it's course. :)
try:
insert into player_table(player_name) values ('$player_name');
Cal
http://www.calevans.com
-Original Message-
From: Doug Linley [mailto:[EMAIL PROTECTED]]
Sent: Mon
If playerid is an auto_increment field, then either of these work --
INSERT INTO player_table(player_name) VALUES ('$player_name');
INSERT INTO player_table(playerid, player_name) VALUES
(NULL,'$player_name');
"Doug Linley" <[EMAIL PROTECTED]> wrote:
I have a table that I created that has a