List:General Discussion« Previous MessageNext Message »
From:Richard Emery Date:May 8 2002 4:15pm
Subject:Re: inserting record
View as plain text  
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


Thread
inserting recordSteve Buehler8 May
  • RE: inserting recordJay Blanchard8 May
  • Re: inserting recordGeorg Richter8 May
  • Re: inserting recordRichard Emery8 May
  • Re: inserting recordJim Philips8 May
RE: inserting recordMax Anderson8 May
Re: inserting recordSteve Buehler8 May
Re[2]: inserting recordSteve Buehler8 May