Still not sure what you actually want to have, but
DROP TABLE IF EXISTS `poll`;
CREATE TABLE `poll` (
`pollid` int(10) unsigned NOT NULL auto_increment,
`question` varchar(100) NOT NULL default '',
`dateline` int(10) unsigned NOT NULL default '0',
`options` text NOT NULL,
`votes` text NOT NULL,
`active` smallint(6) NOT NULL default '1',
`numberoptions` smallint(5) unsigned NOT NULL default '0',
`timeout` smallint(5) unsigned NOT NULL default '0',
`multiple` smallint(5) unsigned NOT NULL default '0',
`voters` smallint(5) unsigned NOT NULL default '0',
`public` smallint(6) NOT NULL default '0',
`lastvote` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`pollid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `pollvote`;
CREATE TABLE `pollvote` (
`pollvoteid` int(10) unsigned NOT NULL auto_increment,
`pollid` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
`votedate` int(10) unsigned NOT NULL default '0',
`voteoption` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`pollvoteid`),
KEY `pollid` (`pollid`,`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Attention: If you have values in the tables they WILL be deleted if you execute this queries.
|