I have a database of entries with unique ids that are automatically created/incremented. So when I insert an entry in the database, I insert all the information besides the Id.
Is there anyway to get this Id when you insert information?
The only way I can think of doing it right now is:
INSERT Data1 Data2 Data3
SELECT id WHERE data1='$data1', data2='$data2'...
Is there anyway I can insert data and have the ID returned in the process?
I'm probably overlooking something very easy...
Is there anyway to get this Id when you insert information?
The only way I can think of doing it right now is:
INSERT Data1 Data2 Data3
SELECT id WHERE data1='$data1', data2='$data2'...
Is there anyway I can insert data and have the ID returned in the process?
I'm probably overlooking something very easy...