Hi.
I've got a query that inserts data into a table.
Query1
When data is inserted it automatically creates an ID (incremented value) in the table rowCode:"INSERT INTO `dbPosts` (`post`, `username_id`, `private`) VALUES ('$post', '$user', '1')";
I've got another query in the same php document that inserts data into another table:
Query2
How do I copy the ID which was automatically inserted in query1 into query2.Code:"INSERT INTO `dbPrivate` (`username_id`) VALUES ('$user')";



Reply With Quote




Bookmarks