I need to insert data into a mysql table in one query. The query inserts more than 1 record, and the 2nd record needs to get the id of the first one and populate it in a parentid column. I'm new at scripting queries, and I have no idea how to accomplish this.
example:
| id | parentid |
| 1 | null |
| 2 | 1 |