RE: [PEAR] Re: insert id
| From: | Alok K. Dhir | Date: | Thu, 24 Jan 2002 15:29:52 +0000 |
| Subject: | RE: [PEAR] Re: insert id | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-722@lists.php.net to get a copy of this message | ||
How is this implemented with mysql? I.e. how does the db driver know
the _next_ value in a mysql auto_increment column?
> -----Original Message-----
> From: Alexander Merz [mailto:alexander.merz@t-online.de]
> Sent: Thursday, January 24, 2002 9:36 AM
> To: pear-general@lists.php.net; Luc Saint-Elie
> Subject: Re: [PEAR] Re: insert id
>
>
> > $lastAutoIncrement = mysql_insert_id($db->connection);
> This is not recommended and "use at your own risk".
>
> The OP is looking for "sequences"
> http://pear.php.net/manual/en/core.db.tut_sequ> ences.php
>
>
http://pear.php.net/manual/en/core.db.createsequence.php
http://pear.php.net/manual/en/core.db.dropsequence.php
http://pear.php.net/manual/en/core.db.nextid.php
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net
For additional commands, e-mail: pear-general-help@lists.php.net To
contact the list administrators, e-mail: php-list-admin@lists.php.net