Hello,
I have a table called users. The user_id field is the PRIMARY KEY, and is to be auto_incremented. After inserting to the table using INSERT INTO, how can I get the user_id of the new record.
Also, I do not want to do a SELECT picking out the last record in the table because I want to do the same thing after using UPDATE on the table (which I'm sure will only return one record).
Thank you
I have a table called users. The user_id field is the PRIMARY KEY, and is to be auto_incremented. After inserting to the table using INSERT INTO, how can I get the user_id of the new record.
Also, I do not want to do a SELECT picking out the last record in the table because I want to do the same thing after using UPDATE on the table (which I'm sure will only return one record).
Thank you