heers,
Prathap
-- Original Message ---
From: John Nichel <[EMAIL PROTECTED]>
To:
Sent: Tue, 20 Jun 2006 00:19:20 -0400
Subject: Re: [PHP] mysql_db_query & INSERT
> Jay Blanchard wrote:
> > [snip]
> > How do I retrieve the auto generated primary key field
>
After you do your first insert, do:
$insertedid = mysql_insert_id();
That will give you the autoincrement ID from the last INSERT you did. Note,
this doesn't retrieve the last autoincrement ID from any insert, just the last
one for thta specific mysql connection. So you don't have to worry ab
At 8:47 AM +0600 6/20/06, Prathaban Mookiah wrote:
>I have run into a tricky situation and need some help to work my way through
>the problem. I use MySQL.
>
>I accept some data from the user and insert them into two tables.
>
>1. I insert part of the data into the first table. I do not specify the
Jay Blanchard wrote:
[snip]
How do I retrieve the auto generated primary key field
in the first table during the first insert operation.
[/snip]
http://www.php.net/mysql_insert_id
You mean they have a manual for this stuff??
Holy Toledo!
--
By-Tor.com
...it's all about the Rush
http://www
[snip]
How do I retrieve the auto generated primary key field
in the first table during the first insert operation.
[/snip]
http://www.php.net/mysql_insert_id
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Prathaban Mookiah wrote:
I have run into a tricky situation and need some help to work my way through
the problem. I use MySQL.
I accept some data from the user and insert them into two tables.
1. I insert part of the data into the first table. I do not specify the
primary key field. It is au
I have run into a tricky situation and need some help to work my way through
the problem. I use MySQL.
I accept some data from the user and insert them into two tables.
1. I insert part of the data into the first table. I do not specify the
primary key field. It is auto generated through auto_i
7 matches
Mail list logo