Web Analytics Made Easy -
StatCounter getting indentity of new records - CodingForum

Announcement

Collapse
No announcement yet.

getting indentity of new records

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting indentity of new records

    I have a sql -- I want to insert a record and then get the identity (autonumber field) from that record to insert into another table.

    How do I do this with php and mysql?

  • #2
    mysql_insert_id

    Hi,

    You want to use the mysql_insert_id function.

    That will return the id generated from your insert query

    bwuk

    Comment

    Working...
    X