This content has been marked as final. Show 4 replies
To me it looks just like you need to link the two tables using a parent & child relationship, this means having a foreign id in the child table which has a value the same as the autonumber Id field from the first. You can link the two tables together in QUB by dragging the f_id from the second table onto the parent autonum id.
hi there thanks for the reply
i know about joining tables in QUB .... I have done before and had it all working fine.... I had a product table and a category table.. and could link ok....
but that was a while ago.... and i forgot exactly what I needed to do to set up the tables correctly
I read somewhere a long time ago that the storage engine has to be inoDB
not myisiam and that the field that links the first table has to be an INT field (the foreign key field) with a default of '0' to the primary key of the second
I went back and changed my tables and got them joined ok
But I still don't know exactly why I had to set the default value in the linked field to '0' or why the field has to be INT ??
If you could tell me why .... that would be great
but all is working fie now
Thanks for your help much appreciated
have a great day
Hi well I personally would say that the main difference between MyISAM & InnoDB comes down to security inoDB is a bit more secure. InoDB does not lock rows but MyISAM locks tables which prevents multipal changes in the same table at the same time. there has quite a few forum threads regarding speed but this is totally dependent on db structor InnoDB is transactional, supports Foreign Key and has an operational overhead.
If I remember correctly (I use falcon now)a foreign key field cannot be set as default to NULL and by its nature it would need to be an interger to link correctly
Thank you very much for your response
that makes sense to me
Have a great day thanks again