Page 1 of 1

Error in SQL Query

Posted: 21 Sep 2008, 00:26
by Frieki
Hi,
In a new phoca installation with the last version my db tables were not created. I followed your instructions and run the sql query given in install.bak in admin-php. However, I get the following response:

[code]jos ALTER TABLE `jos__phocagallery_categories` ADD `hits` INT( 11 ) NOT NULL DEFAULT '0' AFTER `count` ;
MySQL meldet: Dokumentation
#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 'jos ALTER TABLE `jos__phocagallery_categories` ADD `hits` INT( 11 ) NOT NULL DEF' at line 1[/code]

What is wrong in the syntax? My system info tolds me: Database version 5.0.32-Debian_7etch6 , PHP 5.2, Apache Server.

Re: Error in SQL Query

Posted: 22 Sep 2008, 15:02
by Jan
Hi, see:

https://www.phoca.cz/documentation/index ... stallation

this part:

TablePrefix is the prefix you selected while installing Joomla! 1.5 (it is mostly 'jos_' and it should differentiate the Joomla! tables from other tables used in your database). Make sure that you delete #_ at the start of the line; you only need one _ {underscore}


Jan

Re: Error in SQL Query

Posted: 22 Sep 2008, 15:52
by Frieki
Thanks Jan,

I could run the script now and Phocagallery is running.

The problem was the single_underscore. Copying the query to my editor all underscores were double, like__this.

Re: Error in SQL Query

Posted: 22 Sep 2008, 22:19
by Jan
Ok