Log in

View Full Version : Poll....


nautiqeman
01-21-2005, 02:44 PM
Could I get a backup script of the poll table by any chance -- mine accidently was deleted :( .... idk what happened? Thanks in advance!!

Marco van Herwaarden
01-21-2005, 03:00 PM
??

You want a script to recreate the poll table?
Or you want a script to restore from a database backup?

nautiqeman
01-21-2005, 04:35 PM
no a script to recreate the poll table and any others that are associated with it -- THANKS!!!!

Marco van Herwaarden
01-21-2005, 08:00 PM
Repair table in ACP

nautiqeman
01-21-2005, 11:05 PM
I did that -- but it's still the new table -- it's like the poll table got overwritten -- I just need the script for the real table and any other ones that are supposed to go with it

Andreas
01-21-2005, 11:30 PM
*confused*

What exactly do you want to do?
If the poll table is empty or does not exist, there is no way you can reconstruct its contents (except reloading a backup).

nautiqeman
01-21-2005, 11:32 PM
Just an exported script of the poll table and any other ones that may be associated with it

I don't have the proper fields for the polls to work -- I get SQL errors everywhere

Andreas
01-21-2005, 11:39 PM
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.

nautiqeman
01-22-2005, 12:31 AM
thank you so much -- worked perfect!!!