I'm pretty new to MySQL, and I hope i'm getting things right. I've set up a database with 3 tables with columns as below (Primary keys are PK):
Users
table
- uid (PK)
- username
Directories
table
- uid
- path
- project
DirInfo
table
- infoID (PK)
- size
- dateofcheck
- exists
- pathID
When I insert NULL values to Directories.pathID, I get a new pathID (auto increment). How can I then insert that same pathID to DirInfo.pathID ?
Will I have to run multiple queries to INSERT and SELECT to keep each column in each table up to date, or am I doing things wrong.