On Sunday, June 2, 2002 at 4:07:31 AM, you wrote:
> will this return the row number or the "id" fields value..?
> If it returns the row number how do I get the ID number?
> The id started at 1500.
>From the manual page for mysql_insert_id()...
"mysql_insert_id() returns the ID generated for an A
Hey Julie,
Thanks for replying,
Actually the ID field is not null,primary and auto_increment.
Thanks for the URL but in my message I did quote the line from that same url
(http://www.php.net/manual/en/function.mysql-insert-id.php)
I just need to get the ID of the just inserted record.
Any idea
r> I am inserting a row into a table with this structure
r> id (auto increment)
...
Assuming you mean ID int not null primary key auto_increment (or
something like that).
r> Then according to the manual I have to use (to quote)
r> "printf ("Last inserted record has id %d\n", mysql_insert_id());"
3 matches
Mail list logo