Hi simonok,
Yes, I can reproduce this error now too. It appears that it happens while trying to execute the sql code to create tables at the top of the module. It seems to work when creating the tables for the first time, but when checking if they exist, when they do exist, the sql fails.
As a temporary measure I’ve just deleted all lines in the module that create the tables. Make sure that they exist first before you do that though! The lines are:
//-- update db tables if required
$sqlp ="
CREATE TABLE IF NOT EXISTS `".$polltable."` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) default NULL,
`question` varchar(255) default NULL,
`votes` int(11) default '0',
PRIMARY KEY (`id`)
);
";
$sqlpc ="
CREATE TABLE IF NOT EXISTS `".$choicetable."` (
`id` int(11) NOT NULL auto_increment,
`pollid` int(11) NOT NULL default '0',
`choice` varchar(255) default NULL,
`votes` int(11) default '0',
PRIMARY KEY (`id`),
KEY `pollid` (`pollid`)
);
";
$sqlip ="
CREATE TABLE IF NOT EXISTS `".$iptable."` (
`id` int(11) NOT NULL auto_increment,
`pollid` int(11) default NULL,
`ipaddress` varchar(255) default NULL,
PRIMARY KEY (`id`)
);
";
$modx->db->query($sqlp);
$modx->db->query($sqlpc);
$modx->db->query($sqlip);