Reference table and insert problem

admin

Administrator
Staff member
Hi there,

A couple of question from a newcomer...

1) I have created two table in MySQL... one table called "brand_name" has three columns (id, name, type_id) and the other table called "types" has two columns (id, type).

How do I make type_id in "brand_name" table to reference onto id in the "types" table (so that type_id get its value only in the range of values of the id in the "types" table). Using "reference" I should not need to set the type of the column since it will automatically get it from the id column on the other table...

2) If I set the type of NAME in the "brand_name" table to BLOB or LONG BLOB, is it possible to insert a combined format of text and image in that column? If yes... imagine an example having a word document with text and one image... how do I insert it in the column?

best regards
AkaX
 
Back
Top