GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   sql help? (https://gfy.com/showthread.php?t=504391)

milkit 08-16-2005 01:19 PM

sql help?
 
Trying to import a sql file into a new DB i made.

i get this error when i go to import it

PHP Code:

"MySQL said:  

#1064 - 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 'DEFAULT CHARSET=latin1' at line 14 " 

and the basics of what im importing is

PHP Code:

DROP TABLE IF EXISTS `exporter`;
CREATE TABLE `exporter` (
  `
gal_idint(11NOT NULL auto_increment,
  `
gal_titletext NOT NULL,
  `
gal_linktext NOT NULL,
  `
site_nametext NOT NULL,
  `
nn_nudevarchar(4NOT NULL default '',
  `
gal_shorttext NOT NULL,
  `
gal_longtext NOT NULL,
  `
num_thumbsint(11NOT NULL default '0',
  `
pic_vidchar(3NOT NULL default '',
  `
thumb_urltext NOT NULL,
  `
site_urltext NOT NULL,
  
PRIMARY KEY  (`gal_id`)
ENGINE=INNODB DEFAULT CHARSET=latin1


Any ideas?

milkit 08-16-2005 01:22 PM

mysql (4.0.22-standard) btw

jwerd 08-16-2005 01:31 PM

ENGINE=INNODB DEFAULT CHARSET=latin1;

I am going to say the engine declare. If you don't need it to be specifically MyIsam, take it out and see if that works... it should. Basically it's like forcing it to one type and sometimes the different types aren't accepted for that specific charset or engine type. Goodluck! :thumbsup

jwerd 08-16-2005 01:32 PM

Nvm,
`gal_id` int(11) NOT NULL auto_increment,

it should be:
`gal_id` int(11) auto_increment NOT NULL ,

milkit 08-16-2005 01:33 PM

so try it as

[HTML]DROP TABLE IF EXISTS `exporter`;
CREATE TABLE `exporter` (
`gal_id` int(11) NOT NULL auto_increment,
`gal_title` text NOT NULL,
`gal_link` text NOT NULL,
`site_name` text NOT NULL,
`nn_nude` varchar(4) NOT NULL default '',
`gal_short` text NOT NULL,
`gal_long` text NOT NULL,
`num_thumbs` int(11) NOT NULL default '0',
`pic_vid` char(3) NOT NULL default '',
`thumb_url` text NOT NULL,
`site_url` text NOT NULL,
PRIMARY KEY (`gal_id`)
) DEFAULT CHARSET=latin1; [/HTML]

?

jwerd 08-16-2005 01:34 PM

Quote:

Originally Posted by milkit
so try it as

[HTML]DROP TABLE IF EXISTS `exporter`;
CREATE TABLE `exporter` (
`gal_id` int(11) NOT NULL auto_increment,
`gal_title` text NOT NULL,
`gal_link` text NOT NULL,
`site_name` text NOT NULL,
`nn_nude` varchar(4) NOT NULL default '',
`gal_short` text NOT NULL,
`gal_long` text NOT NULL,
`num_thumbs` int(11) NOT NULL default '0',
`pic_vid` char(3) NOT NULL default '',
`thumb_url` text NOT NULL,
`site_url` text NOT NULL,
PRIMARY KEY (`gal_id`)
) DEFAULT CHARSET=latin1; [/HTML]

?

I wrote above what was causing your error. The engine type really would only effect older versions, atleast from what I've learned. Anyways, goodluck! :)

milkit 08-16-2005 01:36 PM

tried both of those, same error now on all 3 ways

jwerd 08-16-2005 01:41 PM

Hold on, I'll take a look...

dubsix 08-16-2005 01:41 PM

Quote:

Originally Posted by lamerhooD
I wrote above what was causing your error. The engine type really would only effect older versions, atleast from what I've learned. Anyways, goodluck! :)


no, thats entirely wrong the CHARSET is not supported in 4.0.x

you'll want to drop the default charset or upgrade to mysql 4.1.x

milkit 08-16-2005 01:42 PM

k fixed i changed

) ENGINE=INNODB DEFAULT CHARSET=latin1;

to

) ENGINE=INNODB;

and it worked. thanks www.wiresix.com for the help :P

jwerd 08-16-2005 01:43 PM

Quote:

Originally Posted by WireSix-Ryan
no, thats entirely wrong the CHARSET is not supported in 4.0.x

you'll want to drop the default charset or upgrade to mysql 4.1.x

You're right, try what he's said. I thought ever since 4.0.x they offered that. I'm still in the 3.0 days :P


All times are GMT -7. The time now is 03:03 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123