Jump to content

[SOLVED] Primary key of an insert table


studgate

Recommended Posts

hi Guys,

  I am trying to update a table that I just insert inot the database.

i insert the value and I want to get the primary key of that entry

and update another field with that same value.

 

Example: TABLE (ID, NAME, OTHERFIELD)

            INSERT into table (name) VALUES ('$NAME');

            UPDATE table SET (OTHERFIELD) VALUES (ID)

 

I hope I explain it properly.

let me know if you have a question

Link to comment
https://forums.phpfreaks.com/topic/102376-solved-primary-key-of-an-insert-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.