Hi, I'm a database novice and need a few pointers (please).
I've created two tables in MySQL:
CREATE TABLE `Users` (
`Username` VARCHAR( 20 ) NOT NULL ,
`Password` VARCHAR( 18 ) NOT NULL ,
`Secret_Question` VARCHAR( 100 ) NOT NULL ,
`Secret_Answer` VARCHAR( 100 ) NOT NULL,
`First_name` Varchar( 20 ) NOT NULL ,
`Surname` Varchar ( 20 ) NOT NULL,
`Email` VARCHAR ( 20 ) NOT NULL
)
CREATE TABLE `Phonebook` (
`Book_Name` VARCHAR( 30 ) NOT NULL ,
`User_ID` VARCHAR( 20 ) NOT NULL
)
I've created primary keys in both tables Table 'Users' the PK is Username and table Phonebook is 'Book_Name'.
What I've been looking at doing is after inserting a row into "Users", getting the username to cascade into "Phonebook" automatically. I'm not necessarily asking for the source to do it (although that would be nice) just a little guidance on where I can read about it. Thanks!