Loading...
 
Architecture / Installation

Architecture / Installation


error in your SQL syntax

posts: 2

Hi I am having a problem with my installation... i am using (DreamHost Mysql5.0.18)

Print operations failed
Command: CREATE TABLE tiki_articles (
articleId int(8) NOT NULL auto_increment,
topline varchar(255) default NULL,
title varchar(80) default NULL,
subtitle varchar(255) default NULL,
linkto varchar(255) default NULL,
lang varchar(16) default NULL,
state char(1) default 's',
authorName varchar(60) default NULL,
topicId int(14) default NULL,
topicName varchar(40) default NULL,
size int(12) default NULL,
useImage char(1) default NULL,
image_name varchar(80) default NULL,
image_caption text default NULL,
image_type varchar(80) default NULL,
image_size int(14) default NULL,
image_x int(4) default NULL,
image_y int(4) default NULL,
image_data longblob,
publishDate int(14) default NULL,
expireDate int(14) default NULL,
created int(14) default NULL,
heading text,
body text,
hash varchar(32) default NULL,
author varchar(200) default NULL,
reads int(14) default NULL,
votes int(8) default NULL,
points int(14) default NULL,
type varchar(50) default NULL,
rating decimal(3,2) default NULL,
isfloat char(1) default NULL,
PRIMARY KEY (articleId),
KEY title (title),
KEY heading 255,
KEY body 255,
KEY reads (reads),
KEY author 32,
FULLTEXT KEY ft (title,heading,body)
) TYPE=MyISAM AUTO_INCREMENT=1
Message: 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 'reads int(14) default NULL,
votes int(8) default NULL,
points int(14) defaul' at line 28


Command: CREATE TABLE tiki_submissions (
subId int(8) NOT NULL auto_increment,
topline varchar(255) default NULL,
title varchar(80) default NULL,
subtitle varchar(255) default NULL,
linkto varchar(255) default NULL,
lang varchar(16) default NULL,
authorName varchar(60) default NULL,
topicId int(14) default NULL,
topicName varchar(40) default NULL,
size int(12) default NULL,
useImage char(1) default NULL,
image_name varchar(80) default NULL,
image_caption text default NULL,
image_type varchar(80) default NULL,
image_size int(14) default NULL,
image_x int(4) default NULL,
image_y int(4) default NULL,
image_data longblob,
publishDate int(14) default NULL,
expireDate int(14) default NULL,
created int(14) default NULL,
bibliographical_references text,
resume text,
heading text,
body text,
hash varchar(32) default NULL,
author varchar(200) default NULL,
reads int(14) default NULL,
votes int(8) default NULL,
points int(14) default NULL,
type varchar(50) default NULL,
rating decimal(3,2) default NULL,
isfloat char(1) default NULL,
PRIMARY KEY (subId)
) TYPE=MyISAM AUTO_INCREMENT=1
Message: 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 'reads int(14) default NULL,
votes int(8) default NULL,
points int(14) defaul' at line 29

How do i solve this? Thanks

posts: 4644 Japan

> > Hi I am having a problem with my installation... i am using (DreamHost Mysql5.0.18)
> >
> > Print operations failed
> > Command: CREATE TABLE tiki_articles (
> > ....
> > reads int(14) default NULL,
> > ...
> >
> >
> > Command: CREATE TABLE tiki_submissions (
> > ...
> > reads int(14) default NULL,
> > ...
> > Message: 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 'reads int(14) default NULL,
>
> >
> > How do i solve this? Thanks
>
> reads becomes a reserved word in MySQL 5.0, so Tiki versions at least up through 1.9.2 aren't compatible. Judging from changes in CVS, apparently "nbreads" (for number of reads) will replace the reserved word in future Tiki versions. In the meantime, I guess you could change "reads" to "nbreads" in the sql statement that isn't working (the CVS version of tiki.sql uses "nbreads" here) and get the CVS versions of lib/artlib.php and templates/tiki-view_articles.tpl so they'll be using a valid query.
>
> Other page files may cause errors as well (when you view them). I believe lib/statslib.php may also have to be updated to replace "reads". There may be other files as well, but I haven't checked thoroughly.
>
> I'm not sure if there are any other issues with Tiki 1.9.2 and MySQL 5.0, but I'm running with that configuration at http://www.pegasosppc.jp pretty smoothly — though not all features are activated.
>
> — Gary - zukakakina.com

posts: 1

In 1.9.2 this was the full list of documents:line number I found needing to be changed.
For the last four, only change the second "reads" occurrence.

tikiwiki/lib/articles/artlib.php:61:
tikiwiki/lib/articles/artlib.php:61:
tikiwiki/lib/articles/artlib.php:145:
tikiwiki/lib/articles/artlib.php:213:
tikiwiki/lib/rankings/ranklib.php:411:
tikiwiki/lib/rankings/ranklib.php:419:
tikiwiki/lib/search/searchlib.php:720:
tikiwiki/lib/search/searchlib.php:724:
tikiwiki/lib/search/searchlib.php:736:
tikiwiki/lib/search/searchlib.php:739:
tikiwiki/lib/searchlib.php:466:
tikiwiki/lib/stats/statslib.php:208:
tikiwiki/lib/tikilib.php:1194:
tikiwiki/tiki-edit_article.php:97:
tikiwiki/tiki-edit_submission.php:98:
tikiwiki/tiki-print_article.php:49:
tikiwiki/tiki-read_article.php:120:


posts: 2

i am also experiencing a SQL issue with postgresql it dies after creating 100 tables.


> Hi I am having a problem with my installation... i am using (DreamHost Mysql5.0.18)
>
> Print operations failed
> Command: CREATE TABLE tiki_articles (
> articleId int(8) NOT NULL auto_increment,
> topline varchar(255) default NULL,
> title varchar(80) default NULL,
> subtitle varchar(255) default NULL,
> linkto varchar(255) default NULL,
> lang varchar(16) default NULL,
> state char(1) default 's',
> authorName varchar(60) default NULL,
> topicId int(14) default NULL,
> topicName varchar(40) default NULL,
> size int(12) default NULL,
> useImage char(1) default NULL,
> image_name varchar(80) default NULL,
> image_caption text default NULL,
> image_type varchar(80) default NULL,
> image_size int(14) default NULL,
> image_x int(4) default NULL,
> image_y int(4) default NULL,
> image_data longblob,
> publishDate int(14) default NULL,
> expireDate int(14) default NULL,
> created int(14) default NULL,
> heading text,
> body text,
> hash varchar(32) default NULL,
> author varchar(200) default NULL,
> reads int(14) default NULL,
> votes int(8) default NULL,
> points int(14) default NULL,
> type varchar(50) default NULL,
> rating decimal(3,2) default NULL,
> isfloat char(1) default NULL,
> PRIMARY KEY (articleId),
> KEY title (title),
> KEY heading 255,
> KEY body 255,
> KEY reads (reads),
> KEY author 32,
> FULLTEXT KEY ft (title,heading,body)
> ) TYPE=MyISAM AUTO_INCREMENT=1
> Message: 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 'reads int(14) default NULL,
> votes int(8) default NULL,
> points int(14) defaul' at line 28
>
>
> Command: CREATE TABLE tiki_submissions (
> subId int(8) NOT NULL auto_increment,
> topline varchar(255) default NULL,
> title varchar(80) default NULL,
> subtitle varchar(255) default NULL,
> linkto varchar(255) default NULL,
> lang varchar(16) default NULL,
> authorName varchar(60) default NULL,
> topicId int(14) default NULL,
> topicName varchar(40) default NULL,
> size int(12) default NULL,
> useImage char(1) default NULL,
> image_name varchar(80) default NULL,
> image_caption text default NULL,
> image_type varchar(80) default NULL,
> image_size int(14) default NULL,
> image_x int(4) default NULL,
> image_y int(4) default NULL,
> image_data longblob,
> publishDate int(14) default NULL,
> expireDate int(14) default NULL,
> created int(14) default NULL,
> bibliographical_references text,
> resume text,
> heading text,
> body text,
> hash varchar(32) default NULL,
> author varchar(200) default NULL,
> reads int(14) default NULL,
> votes int(8) default NULL,
> points int(14) default NULL,
> type varchar(50) default NULL,
> rating decimal(3,2) default NULL,
> isfloat char(1) default NULL,
> PRIMARY KEY (subId)
> ) TYPE=MyISAM AUTO_INCREMENT=1
> Message: 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 'reads int(14) default NULL,
> votes int(8) default NULL,
> points int(14) defaul' at line 29
>
> How do i solve this? Thanks



Upcoming Events

No records to display

Menu