RE: [PHP-DB] simple database question

From: Date: Thu, 26 Jul 2001 14:01:43 +0000
Subject: RE: [PHP-DB] simple database question
Groups: php.db 
Request: Send a blank email to php-db+get-10799@lists.php.net to get a copy of this message
Hi Brian, Are you using MySQL? If so, you can use the function mysql_insert_id(). http://www.php.net/manual/en/function.mysql-insert-id.php That will give you the last id inserted by MySQL which you can use in the address table. Josh Hoover KnowledgeStorm, Inc. jhoover@knowledgestorm.com Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here > -----Original Message----- > From: Brian Weisenthal [mailto:bsw10@cornell.edu] > Sent: Thursday, July 26, 2001 9:53 AM > To: php-db@lists.php.net > Subject: [PHP-DB] simple database question > > > ok this should be an easy one, i am just blanking on it here. > > i want to link two tables together, a user table and address > table. i create > the user entry first, then create the address entry. after > creating the > address entry how do i get the auto_id that was entered in to > enter it into > the user table? there is no unique field in the address > table. any ideas? > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#10799) next »