Re: how can I get the id of the last record I inserted into a table with an insert query?
| From: | Ben Joyce | Date: | Mon, 29 Mar 2004 13:26:21 +0000 |
| Subject: | Re: how can I get the id of the last record I inserted into a table with an insert query? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181654@lists.php.net to get a copy of this message | ||
hello.
mysql_insert_id() should do what you need.
lovely function, that one.
hth,
ben
"Diana Castillo" <diana@interhotel.com> wrote in message
news:20040329131106.4142.qmail@pb1.pair.com...
>
> how can I get the id of the last record I inserted into a table with an
> insert query? (into Mysql database)
> --
> Diana Castillo
> Global Reservas, S.L.
> C/Granvia 22 dcdo 4-dcha
> 28013 Madrid-Spain
> Tel : 00-34-913604039 ext 214
> Fax : 00-34-915228673
> email: diana@hotelkey.com
> Web : http://www.hotelkey.com
> http://www.destinia.com
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>