View Single Post
Old 01-15-2008, 09:19 PM   #1 (permalink)
RobertK
The Addict
Top Contributor Good Samaritan 
 
Join Date: Jan 2008
Location: USA
Posts: 217
Thanks: 16
RobertK is on a distinguished road
Bug MySQL4 compatible imports into v5...

I'm trying to write an installer script, but when it comes down to the actual "drop if exists" statements it dies on the following line. I have MySQL 5.0.50 and the SQL export (that I'm importing with the script) is in MySQL40 compatibility mode.

Can anyone tell me why a simple statement like the following is dying with the given error? When I import this script by phpMyAdmin, I get to specify MySQL40 compatibility mode though, this whole thing works.

sql Code:
DROP TABLE IF EXISTS `jag_categories`;
CREATE TABLE `jag_categories` (
  `cat_id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent` mediumint(8) UNSIGNED NOT NULL,
  `title` tinytext NOT NULL,
  PRIMARY KEY  (`cat_id`),
  FULLTEXT KEY `title` (`title`)
) TYPE=MyISAM;
Quote:
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 '; CREATE TABLE `jag_categories` ( `cat_id` mediumint(8) unsigned NOT NULL au' at line 20
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning. - Rich Cook
RobertK is offline  
Reply With Quote