Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gettin an auto increment value in mysql right away

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
I have a php code that inputs a row into an auto-incremented sql table. Is there a quck way to get the id assed to this row that I am inserting into?

I have something like:
Code:
  $sql = "INSERT INTO move_status SET status='new', date='$date', date_raw='$date_raw'";
  if (@mysql_query($sql)) {
    view_moving_leads();
  }
  else {
    echo ( mysql_error() );
  }

 
Thanks, that was exactly the function i was looking for
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top