I am trying to insert data into a table, however I would like to select the ID which is auto incremented when the row is made, and then I would like to set it into a field within another table.
For example
- INSERT INTO playerdata (Username) VALUES ('%e')
- SELECT ID FROM playerdata p WHERE Username = '%e' LIMIT 1
- UPDATE masterdata SET Slot = p.ID
I have been trying to find out a way for a hours now, but still no luck, so if there is a way to do this, please reply with it or if there is an easier way, then please explain. All replies are gratefully appreciated.