MySQL Syntax Error
Can someone tell me what is causing the syntax error here? I believe it has something to do with this code being for an old version of MySQL.
$dbh->do('CREATE TABLE cands (candid smallint unsigned NOT NULL, pid smallint unsigned NOT NULL, cand varchar(50) NOT NULL, info text, resources text, references text, candtype tinyint unsigned NOT NULL, equiv tinyint unsigned, result varchar(30), actstatus tinyint unsigned NOT NULL default \'1\', moddate timestamp NOT NULL, PRIMARY KEY(candid,pid), KEY cand (cand), KEY candtype(candtype), KEY equiv(equiv), KEY result(result), KEY actstatus(actstatus), KEY moddate(moddate)) ENGINE=InnoDB');
This is the error message I get:
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'references text, candtype tinyint unsigned NOT NULL, equiv tinyint unsigned, res' at line 1 at ./create.pl line 96.
Last edited by otsoga; 06-18-2015 at 01:28 PM.
|