Conduct Web experiments using PHP, Part 1
By Paul Meagher2005-03-16
Database Schema
Listing 1. MySQL schema for WebOffer table
CREATE TABLE `WebOffer` (
`id` int(9) NOT NULL auto_increment,
`vis_id` varchar(32) default NULL,
`sound` enum('on','off') NOT NULL default 'off',
`image` enum('person','product') NOT NULL default 'person',
`text` enum('short','long') NOT NULL default 'short',
`rand` float(5,4) NOT NULL default '0.0000',
`used` enum('y','n') NOT NULL default 'n',
`joined` char(1) default NULL,
`views` int(4) default NULL,
`timer_start` datetime default NULL,
`timer_stop` datetime default NULL,
PRIMARY KEY (`id`),
KEY `vis_id` (`vis_id`),
KEY `used` (`used`)
) TYPE=MyISAM;
Note the use of default NULL values as my convention for coding when no response has occurred in the four response columns appearing in this table:
• joined
• views
• timer_start
• timer_stop
Tutorial pages:
|
First published by IBM developerWorks
|
|||||||||
You might also want to check these out:
|
Leave a Comment on "Conduct Web experiments using PHP, Part 1"
You must be logged in to post a comment.
Link to This Tutorial Page!

