My tables:
recipes
Code:
CREATE TABLE IF NOT EXISTS `recipes` (
`id` mediumint(9) NOT NULL auto_increment,
`user_id` mediumint(9) NOT NULL,
`name` text NOT NULL,
`prep_time` varchar(50) NOT NULL,
`cook_time` varchar(50) NOT NULL,
`directions` text NOT NULL,
`photo` varchar(255) default NULL,
`submitted_time` int(10) NOT NULL,
`category1` varchar(255) NOT NULL,
`category2` varchar(255) NOT NULL,
`category3` varchar(255) NOT NULL,
`category4` varchar(255) NOT NULL,
`category5` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
--
-- Dumping data for table `recipes`
--
INSERT INTO `recipes` (`id`, `user_id`, `name`, `prep_time`, `cook_time`, `directions`, `photo`, `submitted_time`, `category1`, `category2`, `category3`, `category4`, `category5`) VALUES
(1, 26, 'Roasted Potatoes with Golden Garlic Sauce ', '15 minutes', '10 minutes', '1. Preheat oven to 425 degrees. Put 3 tablespoons of the olive oil in the bottom of a 9 x 13-inch baking dish and heat in oven for 5 minutes. Add potatoes, tossing to coat them. Roast the potatoes, turning occasionally, for 30 to 35 minutes or until tender.<br><br>\r\n\r\n2. While the potatoes are baking, prepare garlic sauce: In a small skillet, heat remaining 3 Tablespoons olive oil, add cloves of garlic. Cover and cook over very low heat for 7 to 10 minutes, or until garlic is tender. Sprinkle with sugar and stir until garlic is caramelized. Add balsamic vinegar, white wine, basil and simmer 2 minutes. Spoon sauce over the roasted potatoes. Sprinkle with the fresh ground pepper and parsley and enjoy!', NULL, 1227420425, '1', '2', '3', '4', '5'),
(2, 26, 'Pork Steak Burritos', '10 minutes', '20 minutes', '1. Heat the oil in a skillet over medium-high heat. Place pork in the skillet, and cook until evenly brown. Pour in the salsa, and continue cooking 5 minutes, until heated through.<br><br>2. Place tortillas 1 or 2 at a time on a microwave-safe dish. Cook in the microwave 1 minute on High, until warm. Place equal amounts of pork strips and salsa in the center of each warm tortilla, and roll. Top with sour cream and garnish with green onions to serve.', NULL, 0, '', '', '', '', ''),
(3, 26, 'Vegetarian Lasagna', '20 minutes', 'About a half hour', '1. Bring a large pot of lightly salted water to a boil. Cook lasagna pasta in boiling water for 8 to 10 minutes, or until al dente. Drain, rinse with cold water, and place on wax paper to cool.\r\n\r\n\r\n\r\n2. Cook bell peppers and onion in olive oil in a large sauce pan until onions are translucent. Stir in diced tomatoes, tomato paste, water, and red pepper flakes. More red pepper flakes can be added if spicier sauce is preferred. Simmer for 30 minutes.\r\n\r\n\r\n\r\n3. Preheat oven to 375 degrees F (190 degrees C). In a medium bowl, combine Parmesan cheese, ricotta cheese, mozzarella cheese, eggs, black pepper, and oregano.\r\n\r\n\r\n\r\n4. Place a small amount of sauce in the bottom of a 9x13 inch baking dish. Reserve 1/2 cup of the sauce. Place three lasagna noodles lengthwise in pan. Layer some of the cheese mixture and the vegetable sauce on top of noodles. Repeat layering with remaining ingredients, ending with noodles. Spread reserved sauce over top of noodles. Sprinkle with grated Parmesan cheese, if desired.\r\n\r\n\r\n\r\n5. Cover dish with foil, and bake for 40 minutes or until bubbly. Remove foil during last 10 minutes of baking. ', NULL, 0, '', '', '', '', ''),
(4, 26, 'chicken sandwhich', '5 minutes', '0 minutes', 'put bread on counter. Place one slice on one side ad the other on the other. Go to the refrigerator and pull out the chicken breast. put on bread. Put lettuce on bread. ', NULL, 0, '', '', '', '', ''),
(5, 26, 'Chicken Salad', '20 minutes', '0 minutes', 'chop chicken up and mix with salad. Sprinkle some sprinkles over top if you like that and then move from salad bowl to plate and eat. ', NULL, 0, '', '', '', '', '');
ingredient_types
Code:
CREATE TABLE IF NOT EXISTS `ingredient_type` (
`id` mediumint(9) NOT NULL auto_increment,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
--
-- Dumping data for table `ingredient_type`
--
INSERT INTO `ingredient_type` (`id`, `type`) VALUES
(1, 'chicken'),
(2, 'basil'),
(3, 'tomato'),
(4, 'potato'),
(5, 'rice'),
(6, 'onion'),
(7, 'pork'),
(8, 'beef'),
(9, 'lamb'),
(10, 'turkey'),
(11, 'tortilla');
ingredients
Code:
CREATE TABLE IF NOT EXISTS `ingredients` (
`id` mediumint(9) NOT NULL auto_increment,
`recipe_id` mediumint(9) NOT NULL,
`ingredient_type_id` mediumint(9) NOT NULL,
`amount` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
--
-- Dumping data for table `ingredients`
--
INSERT INTO `ingredients` (`id`, `recipe_id`, `ingredient_type_id`, `amount`) VALUES
(8, 5, 1, ''),
(7, 4, 2, ''),
(6, 4, 1, ''),
(5, 1, 4, ''),
(9, 2, 7, ''),
(10, 2, 11, '');
epantry
Code:
CREATE TABLE IF NOT EXISTS `epantry` (
`id` mediumint(9) NOT NULL auto_increment,
`user_id` mediumint(9) NOT NULL,
`ingredient_id` mediumint(9) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `epantry`
--
INSERT INTO `epantry` (`id`, `user_id`, `ingredient_id`) VALUES
(1, 26, 1),
(2, 26, 4),
(3, 26, 7);
Am I on the right track with the query?
Bookmarks