Re: Class ADODB - Method GenID() in MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Meyer wrote:
Wouldn't this:
$id = mysql_insert_id();
$query = "UPDATE tablename SET id=" . ($id + 1);
$result = mysql_query($query);
Be a little simpler.
But like I said, I'm confused over the need for this in the first place, seeing as how an "auto_incremented" primary key is self-descriptive. or are you saving this somewhere else in the DB?

Using it elsewhere in the db as a foreign key..

;)

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux