Page 1 of 1

PhocaGallery / jComments / SQL error

Posted: 27 Sep 2010, 11:22
by TTom911
I just started testing with PhocaGallery and get a strange error message (not sure if that is a Phoca or jComment issue).

When posting a comment in PhocaGallery and display in the Latest jComments Module I get:

No valid database connection 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 'as imgid c.id as catid, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id,' at line 1 SQL=SELECT a.id, as imgid c.id as catid, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM jos_phocagallery AS a LEFT JOIN jos_phocagallery_categories AS c ON c.id = a.catid WHERE a.id = 67
test2
27.09.10 09:07

Article comments show ok in the Latest jComments Module. Seems to happen only in connection with PhocaGallery.

Any idea?

THANKS

Re: PhocaGallery / jComments / SQL error

Posted: 27 Sep 2010, 19:22
by Jan
Hi, I don't know the module, but seems there is a syntax error in sql query:

Code: Select all

a.id, as imgid c.id as catid, 
this should be changed e.g. to:

a.id as imgid, c.id as catid ... or similar.


Jan

Re: PhocaGallery / jComments / SQL error

Posted: 02 Oct 2010, 11:13
by TTom911
thanks, I posted that also in the JoomlaTune forum. The developer initially said he thinks there is nothing wrong with the sql queries, but I pointed out your thoughts and will update you once I hear back from him.

Re: PhocaGallery / jComments / SQL error

Posted: 02 Oct 2010, 17:44
by Jan
Ok

Re: PhocaGallery / jComments / SQL error

Posted: 26 Mar 2011, 19:50
by AbdRahim
Where do I make this change?