Hi there,
I have 2 tables.
One with a auto_increment id coloumn which the foreign key in the other table is linked to.
What I wantto be able to do and know how to do is to put more than one entry of data in but still using the same value as my parent table id:
Table1
id |surname |address |dob
1 | Smith | The street | 20/10/83
Table2
surname |DOB |Owner (foreign key) - table1(id)
Jones | 21/2/1982 | 1
Collins | 13/04/1954 | 1
I am using InnoDB type as MyISAM doesnt use foreign keys. I was using MyISAM with references and LAST_INSERT_ID(ID) but it wasn't working properly.
Can anyone suggest anything??
Thanks and appreciated,
Will