search for: item1_id

Displaying 2 results from an estimated 2 matches for "item1_id".

Did you mean: item&id
2005 Dec 19
2
Difficulty using correct moldel for the data in DB
...(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) , `cat_id` INTEGER(11), `rank` INTEGER , PRIMARY KEY(`id`) ); CREATE TABLE `cats` ( `id` INTEGER(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255), PRIMARY KEY(`id`) ); CREATE TABLE `fusions` ( `id` INTEGER(11) NOT NULL AUTO_INCREMENT, `item1_id` INTEGER(11), `item2_id` INTEGER(11) , `product_id` INTEGER(11), PRIMARY KEY(`id`) ); Now... Creating one-to-many relationship for item/category is cake. How do I set up my model for item and fusion so I can have something like below in my view? <% for fusion in @item.fusions %> <%=...
2005 Dec 18
0
Difficulty with creatating a model
...T NULL AUTO_INCREMENT, `name` VARCHAR(255) , `cat_id` INTEGER(11), `rank` INTEGER , PRIMARY KEY(`id`) ); CREATE TABLE `cats` ( `id` INTEGER(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255), PRIMARY KEY(`id`) ); CREATE TABLE `fusions` ( `id` INTEGER(11) NOT NULL AUTO_INCREMENT, `item1_id` INTEGER(11), `item2_id` INTEGER(11) , `product_id` INTEGER(11), PRIMARY KEY(`id`) ); Now... Creating one-to-many relationship for item/category is cake. How do I set up my model for item and fusion so I can have something like below in my view? <% for fusion in @item.fusions %> &lt...