I have a DB with 3 tables. The main table is 'tblProducts' which has an auto_increment field called "ProductID'. The other 2 tables use the ProductID field to refrence items.
When I Insert an item into tblProducts it creates a new ProductID I need to get this ProductID so I can Insert It into the other 2 tables that refrence it. So how do I figure out what the New ProductID is going to be when I insert this new info into the table?
I could do a "SELECT ProductID From tblProducts ORDER BY ProductID" and get it that way but isnt there a better way? See once I enter data into that table then i have another table that has multiple items for each item added, so I would have to do this over and over many times, Select, Insert, Select, Insert etc..
Is there a better way?
Thanks!😃