I have a table DEVICEDETAILS whose primary key is DEVICEID. I would like to get the ID of the field that was last inserted. The last_insert_id() does not work as the primary key is not AUTO_INCREMENT.
Thanks in advance to Stack Overflow People
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So if it is not auto_increment I assume that you have just inserted the record using deviceid so surely you already know it.