Reply to Re: Getting MySQL Generated Keys

Your name:

Reply:


Posted by Chris Hope on 10/12/82 11:16

thehuby wrote:

> I am a Java/JSP developer by trade but am currently developing a
> MySQL/PHP solution.
>
> In JSP when I run an INSERT statement on the db I am able to
> automatically get back a list of any generated keys (without having to
> do some sort of subsequent query to get the information).
>
> Is there a PHP equivilent of this?

Unfortunately, as with all built in PHP database functions, there's no
database abstraction layer built into PHP which will do it for any
database, but for mysql you can use the mysql_insert_id() function.

http://www.php.net/mysql_insert_id

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

[Back to original 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

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