SQL, PHP Prob?
Posted by: Legion (---.ipt.aol.com)
Date: August 18, 2006 07:28PM

I've started using the wamp server to develope websites on which use PHPNuke

my problem is this, when i try installing new modules which i have used in the past i keep getting error messages, an example is as follows.





-> Database Error: Invalid SQL: CREATE TABLE vwar1_acpmenugroups (
groupid int(10) unsigned NOT NULL auto_increment,
groupname varchar(20) NOT NULL default '',
grouptitle varchar(50) NOT NULL default '',
condition text NOT NULL,
conditiontype enum('OR','AND') NOT NULL default 'OR',
displayorder smallint(5) NOT NULL default '0',
PRIMARY KEY (groupid)
) TYPE=MyISAM;
-> MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition text NOT NULL,
conditiontype enum('OR','AND') NOT NULL default 'OR'' at line 5
-> MySQL Error Number: 1064
-> Date: 18.08.2006 @ 18:17
-> Script: /Re/install_vwar.php?step=4

I've contacted the creators of this particular module and they suggest there is a problem with way in which mysql or PHP setup.

any help or advice on this issue would be greatly appretiated.

thank you in advance

Options: ReplyQuote
Re: SQL, PHP Prob?
Posted by: CyberSpatium (67.170.181.---)
Date: August 18, 2006 09:14PM

error code #1064 is a server side ER_PARSE_ERROR

before MySQL 5.0.2, ENUM column type did not provide true constraints on entry of invalid data. WAMP uses mysql 5.0.22. your mysql code was developed with a mysql version older than 5.0.2. So because of this imcompatability, you are getting this error.

However, you can switch mysql to strict sql mode. with strict mode enabled, the definition of a ENUM column does act as a constraint on values entered into the column.

edit your sql code above and add this line BEFORE your CREATE TABLE vwar1_acpmenugroups sql code
SET @@global.sql_mode='';

if that does not work, try
SET @@global.sql_mode='STRICT_TRANS_TABLES';

[dev.mysql.com]

Options: ReplyQuote
Re: SQL, PHP Prob?
Posted by: Legion (---.ipt.aol.com)
Date: August 18, 2006 11:03PM

Thank you very much for your time .

ok i've tried using the lines you've gave but now i keep getting this error

Parse error: parse error, unexpected '@'

Options: ReplyQuote


Sorry, only registered users may post in this forum.