NYCPHP Meetup

NYPHP.org

[nycphp-talk] Data import from MySQL 3.23 to MySQL 4.0

Allen Shaw ashaw at iifwp.org
Thu Jan 6 14:21:15 EST 2005


SHOW is a keyword in 4.0.  Try using backticks so mysql knows you're 
defining a column name and not a SHOW statement:
...  pic varchar(50) default NULL,
  `show` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY  (s_id) ...

- Allen

Ajai Khattri wrote:

> Im trying to import data from a database in MySQL 3.23 to another 
> server using MySQL 4.0.
>
> Im getting an error creating this table:
>
> ERROR 1064 at line 47: 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 'show tinyint(1) unsigned NOT NULL default '1', 
> PRIMARY KEY  (s_
>
> The SQL looks like this:
>
> CREATE TABLE items (
>  s_id int(10) unsigned NOT NULL auto_increment,
>  title varchar(100) default NULL,
>  description tinytext,
>  price float default NULL,
>  pic varchar(50) default NULL,
>  show tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY  (s_id)
> ) TYPE=MyISAM;
>
> Anyone know offhand what changed and how I can modify this to complete 
> the import?
>

-- 
===========================================================
Allen Shaw                                  ashaw at iifwp.org
IIFWP Data and                           914.631.1331 x.106
    IT Services                        http://www.iifwp.org




More information about the talk mailing list