Jump to content
xisto Community
wappy

Help With Sql File? please help me.

Recommended Posts

hi, im really confused, i just tried to install an sql file for a wap top list that i have used before on other hosts, but when i import it it says the is an error with it but its worked for me in the past?? Can anyone help me work out why the code is giving me an error? Here is the sql file:

-- Table structure for table `uglymonkey_toplist`-- DROP TABLE IF EXISTS `uglymonkey_toplist`;CREATE TABLE `uglymonkey_toplist` (  `id` int(4) NOT NULL auto_increment,  `name` varchar(30) NOT NULL default '',  `pass` varchar(30) NOT NULL default '',  `mail` varchar(100) NOT NULL default '',  `link` varchar(150) NOT NULL default '',  `logo` varchar(150) default NULL,  `cat` varchar(10) NOT NULL default '',  `date` datetime NOT NULL default '0000-00-00 00:00:00',  `lastout` datetime NOT NULL default '0000-00-00 00:00:00',  `lastin` datetime NOT NULL default '0000-00-00 00:00:00',  `incoming` int(10) NOT NULL default '0',  `out` int(10) NOT NULL default '0',  `total` int(10) NOT NULL default '0',  `description` varchar(150) NOT NULL default '',  PRIMARY KEY  (`id`),  UNIQUE KEY `name` (`name`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=97;-- -- -- 
please help me i really need to get this working =[

Share this post


Link to post
Share on other sites

Were you given any response as to what section of the SQL file was causing the error? Normally it will say something along the lines of "Check your code near..." which would be quite useful.

Share this post


Link to post
Share on other sites

sorry yes the charset and increment lines i think. I have managed to get on that works and also has another table for a reset clock, here is the new code but i would still like to know why the first one didn't work as i have used it before, very recently infact but on a different server :-)

-- -- Table structure for table `uglymonkey_toplist`-- CREATE TABLE `uglymonkey_toplist` (  `id` int(4) NOT NULL auto_increment,  `name` varchar(30) NOT NULL default '',  `pass` varchar(30) NOT NULL default '',  `mail` varchar(100) NOT NULL default '',  `link` varchar(150) NOT NULL default '',  `logo` varchar(150) default NULL,  `cat` varchar(20) NOT NULL default '',  `date` datetime NOT NULL default '0000-00-00 00:00:00',  `lastout` datetime NOT NULL default '0000-00-00 00:00:00',  `lastin` datetime NOT NULL default '0000-00-00 00:00:00',  `incoming` int(10) NOT NULL default '0',  `out` int(10) NOT NULL default '0',  `total` int(10) NOT NULL default '0',  `description` varchar(150) NOT NULL default '',  PRIMARY KEY  (`id`),  UNIQUE KEY `name` (`name`)) TYPE=MyISAM AUTO_INCREMENT=22;-- -- Clock for counter reset `uglymonkey_clock`-- CREATE TABLE `uglymonkey_clock` (  `time` datetime NOT NULL default '0000-00-00 00:00:00',  PRIMARY KEY  (`time`),  UNIQUE KEY `name` (`time`)) TYPE=MyISAM AUTO_INCREMENT=22;

Share this post


Link to post
Share on other sites

I have a feeling that the Charset is not defined simply with CHARSET= but has to be done this way:

SET CHARACTER SET charset_name
The rest of it looks OK as you say. If you used it in other places then it's probably a different MySQL version to the one here at Trap.

Share this post


Link to post
Share on other sites

check the mysql version you last ran this code with and see how it compares to the version at the Xisto server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.