PDA

View Full Version : SQL Error


asia
06-02-2006, 06:03 AM
Hello,

I got this sql error.

Does anyone know how to fix it?

You have an error in your SQL syntax near '(SELECT t1.*, COUNT(DISTINCTROW t4.`id`) num_links, '0' `crossed`, t21.`num_cols' at line 1

Vasily B.
06-02-2006, 06:06 AM
Welcome to our support forums, asia
Please check your MySQL version. We require MySQL 4.0 or above. It seems you have 3.23 version.

asia
06-02-2006, 07:29 AM
I updated mysql to version 4 and now it worked.

I placed eSyniCat in /directory/ (subfolder).


To display the eSyniCat, I'd need to url http://www.mydomain.com/directory.

How grab the categories part and place it in root /index.php as I dont want to move eSyndiCat from /directory (httpdocs/directory) to root doc (httpdocs)?

Nick Collins
06-02-2006, 08:42 AM
Hello asia! I would advice you to install script again to the root directory on your server and then simply import categories from your old DB via phpMyAdmin.

Here is a theoretical way to achieve your needs without moving of script files or fresh installation (I didn't test it myself):

***move .htaccess file from "directory" folder to the ROOT***
***find mod_rewrite rules for categories pages***
# mod_rewrite rules for categories pages
RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

***and replace with***
# mod_rewrite rules for categories pages
RewriteRule ^(.*)/$ dir/index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ dir/index.php?category=$1&page=$2 [QSA,L]

Make the similar changes with other rules. Then open your admin cp and go to "General Configuration". Remove "/directory" in "Base URL to script" field. Save changes.
Hope it will help, but pay attention please to my advice at the top of this post.

asia
06-02-2006, 10:53 PM
It was working fine when I left it in /directory folder.

I followed the above instruction and put it in ROOT with the changes made in .htaccess file. Now I cannot go to the categories, privacy page, contact page, terms page, and etc pages.

Is there something wrong with the mod rewrite?

asia
06-02-2006, 11:33 PM
There is definitely something wrong with mod rewrite. I had to disable mod rewrite in the admin config area to get the script work. I will wait to see if you have a solution to solve this mod rewrite and I want to enable it.

Sergey Ten
06-03-2006, 10:05 PM
Hello asia,

I think you need add this code in your .htaccess file


RewriteBase /your_dir/

asia
06-04-2006, 01:14 AM
I am not sure what you mean by /your_dir/.


path to www directory: /home/httpd/vhosts/mydomain.com/httpdocs


I placed all files to /httpdocs, which is my root www folder.


What do you want me to put for your_dir

Sergey Ten
06-04-2006, 04:44 PM
If you have such directory http://www.mydomain.com/directory then


RewriteBase /directory/