samona Posted June 11, 2008 Share Posted June 11, 2008 How do i get the Primary Key when I do an update. When I do an Insert I use mysql_insert_id() to capture the primary key. IS there a way to do it with Update? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 11, 2008 Share Posted June 11, 2008 No, with UPDATE, you are editing records, not adding ones. So no *new* IDs are generated. You need to know the ID of the record you want to update before doing the update. Quote Link to comment Share on other sites More sharing options...
fenway Posted June 12, 2008 Share Posted June 12, 2008 How do i get the Primary Key when I do an update. When I do an Insert I use mysql_insert_id() to capture the primary key. IS there a way to do it with Update? How did you know which one to update without the PK? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.