How can I get the auto_increment value that MySQL generated for the current insert row, so I can use it in the insert command? For example:
INSERT INTO aTable (aField) VALUES ( AUTOINCVALUEHERE )
This does not seem like a complicated operation, but I have been unable to find any solution here, in the MySQL documentation, or otherwise. I am aware of the potential of executing an UPDATE, but I would much prefer if I did not need to run multiple queries to accomplish this.
I have already tried LAST_INSERT_ID() - it does not work, and the docs say it only is intended to give the value from the last query executed, not the current one.