You are here: Re: How to get the value of an auto_increment primary key after an insert ? « PHP SQL « IT news, forums, messages
Re: How to get the value of an auto_increment primary key after an insert ?

Posted by NC on 09/11/06 15:01

Pugi! wrote:
>
> In a mysql database you have a table, with an integer
> as primary key. You've specified auto_increment.
> Using PEAR to access your database how do you
> get hold of the value of the primary key of a row you
> just inserted ?

Call mysql_insert_id():

http://www.php.net/mysql_insert_id

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация