Jump to content

Archived

This topic is now archived and is closed to further replies.

Jocka

mysql 5 problem

Recommended Posts

I have mysql 5 on my home computer. While I know I should have stuck with mysql 4 for now, I always "try" to new things. I managed mysql with phpMyAdmin 2.6.3.

 

The problem is, I exported all my tables and fields. When it exported these fields, it came out in a way that, evidentally, phpMyAdmin 2.6.3 and mysql 4 can't understand.

 

This is a oscommerce database I was editing for a friend and now I can't get it to work on his database without EXTENSIVE editing in the sql code (which could take forever).

 

Here is an example of the SQL code outputed on my home server:

DROP TABLE IF EXISTS `banners`;
CREATE TABLE `banners` (
 `banners_id` int(11) NOT NULL auto_increment,
 `banners_title` varchar(64) NOT NULL,
 `banners_url` varchar(255) NOT NULL,
 `banners_image` varchar(64) NOT NULL,
 `banners_group` varchar(10) NOT NULL,
 `banners_html_text` text,
 `expires_impressions` int(7) '0',
 `expires_date` datetime NULL,
 `date_scheduled` datetime NULL,
 `date_added` datetime NOT NULL,
 `date_status_change` datetime NULL,
 `status` int(1) NOT NULL '1',
 PRIMARY KEY  (`banners_id`)
) ENGINE=InnoDB CHARSET=latin1 AUTO_INCREMENT=2;

 

and here is the error's I get:

#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 ''0',

`expires_date` datetime NULL,

`date_scheduled` datet

 

I know how to fix this manually but again, that would take forever. Is there something I can do to make mysql or phpMyAdmin understand this code?

Share this post


Link to post
Share on other sites
It could be just the format of the fields

sense they are date time

302376[/snapback]

no, like i said, I can fix that error manually. the fix is just changing this

`expires_impressions` int(7) '0',

to this

`expires_impressions` int(7) '',

 

what i need is a way to make all this crap code work lol.

Share this post


Link to post
Share on other sites

×

Important Information

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.