From: Richard Emery Date: May 8 2002 4:15pm Subject: Re: inserting record List-Archive: http://lists.mysql.com/mysql/108391 Message-Id: <00b101c1f6ab$9f10bf80$0200a8c0@C1525232> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I assume team_id is defined as AUTO_INCREMENT. If so, in mysql, use the last_insert_id() function. In PHP use the mysql_insert_id() function. ----- Original Message ----- From: Steve Buehler To: mysql Sent: Wednesday, May 08, 2002 10:01 AM Subject: inserting record I am running mysql with a php frontend. I am trying to add teams to a table and when I do, it gives them a team_id number that is in an auto_increment column. This is no problem. The problem is that I need to know that team_id so that I can also enter the team_id into another table. Any help would be appreciated. Thank You in advance Steve --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail To unsubscribe, e-mail Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php