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 <steve@stripped>
To: mysql <mysql@stripped>
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 <mysql-thread108367@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-remery=emeryloftus.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php