SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 238 | Next

Nirav Mehta

"Mobile Web Development"

We need to first create two tables??”one for recipes and the other for
comments. The following code shows the SQL to create these tables.
CREATE TABLE `recipes` (
`id` int(10) unsigned NOT NULL auto_increment,
`submitter` varchar(75) NOT NULL,
`submitterPhone` varchar(20) NOT NULL,
`photo` varchar(30) NOT NULL,
`dateUpdated` timestamp NOT NULL,
`title` varchar(30) NOT NULL,
`basicInfo` mediumtext NOT NULL,
`ingredients` mediumtext NOT NULL,
`directions` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) COMMENT='Hot recipes';
CREATE TABLE `recipeComments` (
`id` int(10) unsigned NOT NULL auto_increment,
`recipeId` int(11) unsigned NOT NULL,
`submitter` varchar(75) NOT NULL,
`submitterPhone` varchar(20) NOT NULL,
`dateUpdated` timestamp NOT NULL,
`comment` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) COMMENT='Comments on recipes';
2. We can now add a few recipes and comments via phpMyAdmin, so that
when we do the rest of the code, we have some data to display. While
adding data, please ensure that you use proper recipeId values in the
recipeComments table.
3. Let us create the Recipe class now. It will extend the BaseModel class we have
been using in the rest of the POTR code, and will make it easy to retrieve or
save data from the recipe table.


Pages:
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6