PHP Classes

File: schema.sql

Recommend this page to a friend!
  Classes of Andrew Collington   MadLibs   schema.sql   Download  
File: schema.sql
Role: Auxiliary data
Content type: text/plain
Description: An example of the MySQL schema and data for if you choose to use a database to store your stories.
Class: MadLibs
Add a 'madlibs' game to your Web site.
Author: By
Last change:
Date: 20 years ago
Size: 1,260 bytes


Class file image Download
CREATE TABLE madlibs ( id int(11) NOT NULL auto_increment, title varchar(255) NOT NULL default '', story mediumtext NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; INSERT INTO madlibs (id, title, story) VALUES (1, 'Shopping at the mall', '{OPPOSITESEX} and I went shopping at the mall today in {PLACE}. We got {NUMBER} bargains! We bought {NOUN} to repair that leaky roof and {NOUN-PLURAL} as a present for my mom. We also got some {ADJECTIVE} {NOUN-PLURAL} for the car. When {OPPOSITESEX} saw what I bought at Victoria\'s Secret they said, "{FUNNY}!" I was very {EMOTION} about that. That\'s ok, though. Once I saw the {NOUN} they bought for their {ROOM} I couldn\'t stop laughing. Especially since they paid ${NUMBER} for it! We ended up eating {FOOD} in the food court before we came home.'); INSERT INTO madlibs (id, title, story) VALUES (2, 'A trip to the beach', 'Yesterday, {OPPOSITESEX} and I went to the beach. We had a really {ADJECTIVE} time! First, we {VERB-ED} with my {NOUN}. Then we ran down to the ocean and went {VERB-ING}. Afterward, we barbequed some {FOOD} for lunch. Before the sun set we had time to {VERB} on the {NOUN}. We were really {ADJECTIVE} to come home. We are hoping to go to the beach again soon!');