Jump to content


Photo

mysql 5 problem


  • Please log in to reply
2 replies to this topic

#1 Jocka

Jocka
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationDallas, Texas

Posted 03 October 2005 - 05:30 PM

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?

#2 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 03 October 2005 - 07:11 PM

It could be just the format of the fields
sense they are date time
If you understand everything you know nothing!

http://rcchjr.awardspace.com/

#3 Jocka

Jocka
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationDallas, Texas

Posted 03 October 2005 - 07:17 PM

It could be just the format of the fields
sense they are date time

View Post

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users