Jump to content


Photo

mysql_insert_id()


  • Please log in to reply
1 reply to this topic

#1 youngbuc

youngbuc
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 July 2004 - 03:49 PM

i have a db with 4 tables.
-main
-customers
-power
-connections

i am trying to create a form that inserts data into the "main" and "customer" tables. in the MAIN table, the cust_id is set to auto increment. i would like to my form to send the "cust_id" that was just created to the next step of the form or just add it to the next table. 1st form would have 4 fields from the table "main" - cust_id, tenant, environment, and size. cust_id would be set to 0 or null, then when they submit, it would send them to the second form that has fields from "customers" - cust_id (this is where i want to find out what the cust_id was created for the first table),contact, phone, fax and so on. any help would be great.

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 20 July 2004 - 10:13 PM

You will need to hand code this as dreamweaver lacks abillity to insert code to grab lastinserted id. mySQL websitehas relevant info on last id, and the rest you can pass as parameters.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users