|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I am importing mysqldump's from 3.23 into 4.1.
I keep getting stuck on one table though, Mysql throughs the error ERROR 1064 (42000) at line 147951: You have an error in your SQL syntax. The problem is I cant seem to find the syntax error. Below is the create table syntax, the mysql error claims to be near the fields varchar(200) statement. CREATE TABLE exp_member_search ( search_id varchar(32) NOT NULL default '', site_id int(4) unsigned NOT NULL default '1', search_date int(10) unsigned NOT NULL default '0', keywords varchar(200) NOT NULL default '', fields varchar(200) NOT NULL default '', member_id int(10) unsigned NOT NULL default '0', ip_address varchar(16) NOT NULL default '', total_results int(8) unsigned NOT NULL default '0', query text NOT NULL, PRIMARY KEY (search_id), KEY member_id (member_id), KEY site_id (site_id) ) TYPE=MyISAM; Does anyone see anything wrong near fieilds or member_id that could be causing the syntax error? -john |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 28 Sep, 04:51, essenz <j...@essenz.com> wrote:
> I am importing mysqldump's from 3.23 into 4.1. > > I keep getting stuck on one table though, Mysql throughs the error > ERROR 1064 (42000) at line 147951: You have an error in your SQL > syntax. > > The problem is I cant seem to find the syntax error. Below is the > create table syntax, the mysql error claims to be near the fields > varchar(200) statement. > > CREATE TABLE exp_member_search ( > search_id varchar(32) NOT NULL default '', > site_id int(4) unsigned NOT NULL default '1', > search_date int(10) unsigned NOT NULL default '0', > keywords varchar(200) NOT NULL default '', > fields varchar(200) NOT NULL default '', > member_id int(10) unsigned NOT NULL default '0', > ip_address varchar(16) NOT NULL default '', > total_results int(8) unsigned NOT NULL default '0', > query text NOT NULL, > PRIMARY KEY (search_id), > KEY member_id (member_id), > KEY site_id (site_id) > ) TYPE=MyISAM; > > Does anyone see anything wrong near fieilds or member_id that could be > causing the syntax error? > > -john FIELDS is a reserved word in 4.1 (http://dev.mysql.com/doc/refman/4.1/ en/reserved-words.html) Either use backticks or change the field name. |
|
![]() |
| Outils de la discussion | |
|
|