Re: RE: [PHP] mysql_insert_id
| From: | David Robley | Date: | Thu, 29 Jun 2000 02:07:47 +0000 |
| Subject: | Re: RE: [PHP] mysql_insert_id | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3716@lists.php.net to get a copy of this message | ||
On 29 Jun, Delbono wrote:
>
>
> If I leave parameters blank so
>
> $lastID = mysql_insert_id();
>
> $lastID is 0 (zero)
>
>
> And also if I use:
> $link = mysql_connect("$DBHost","$DBUser","$DBPass");
> $lastID = mysql_insert_id($link);
>
> $lastID is 0.
>
>
> ...Thanks for your help..
>
Of course, this only works where the database table has an
Auto-increment field.
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA