Welcome! Log In Create A New Profile

Advanced

error in SQLsyntax

Posted by Jan 
Jan
error in SQLsyntax
September 25, 2014 05:55PM
When trying to instal sphider 1-3-6 I got the following message:

Sphider installation script.
Error: 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 '(14), elapsed float(2), results int, key query_key(query))' at line 3
Creating tables failed. Consult the above error messages.

Help!
Jan
Re: error in SQLsyntax
October 01, 2014 03:41PM
I had the same problem. I decided to just run the tables.sql file to create the database since I didn't see an answer here to your question. When I run the tables.sql file to build the database I get the following the same error----

MySQL said: Documentation

#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 '(14),
elapsed float(2),
results int,
key query_key(query)
) ENGINE = MYI' at line 3


When you visit the site, there are of course errors
Re: error in SQLsyntax
October 01, 2014 04:09PM
I have found the problem is with time timestamp(14) in the mysql coding. If I remove that line the install script / tables.sql runs with no problems. How is this correctly entered for the time line
Re: error in SQLsyntax
October 01, 2014 04:14PM
found the corrections.....

MySQL for the query log should be....


create table query_log (
query varchar(255),
time timestamp,
elapsed float(2),
results int,
key query_key(query)
) ENGINE = MYISAM;


Note the (14) is missing at the end of the time line.
Sorry, only registered users may post in this forum.

Click here to login