Page 1 of 1

2.10RC: DB function failed with error number 1064

Posted: 12 Dec 2008, 19:47
by SoundEagle
Hi Jan,

I upgraded Phoca Gallery from version 2.01 to 2.10RC without a problem.

However, on a number of categories, I got the following message near the top of the screen:
DB function failed with error number 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 ': LIMIT 0,30' at line 1 SQL=SELECT `title` , `introtext` , `fulltext` FROM jos_content WHERE state = 1 AND catid=29: LIMIT 0,30
SQL =
SELECT `title` , `introtext` , `fulltext` FROM jos_content WHERE state = 1 AND catid=29: LIMIT 0,30
Everything below the message displays and works properly, as far as I can ascertain. Nothing seems to be affected, apart from the message being displayed.

Do you know what has been causing this to happen, and what can be done to eliminate the message?

Also, what is the easiest way to find out whether I have all six tables?

Thanks.

Re: 2.10RC: DB function failed with error number 1064

Posted: 12 Dec 2008, 20:51
by Jan
tables: see it in phpMyAdmin...

but I don't know what is this of the SQL error, it is some sql query from com_content ?

maybe this is not correct: catid=29:
maybe it should be catid=29 ( catid = (int)$id )

but where to find this query, maybe try to enable debug (Site - Control Panel - global Configuration - System: Debug System: Yes) to get more information about this sql query...

Jan

Re: 2.10RC: DB function failed with error number 1064

Posted: 13 Dec 2008, 00:29
by SoundEagle
Hi Jan,

In the interest of being clear and thorough, please allow me to elaborate as follows:

(1) I am using Joomla! 1.5.8 and PHP version 5.2.X, and PhocaGallery has never reported any upgrade errors whenever I clicked the "Upgrade" button during all the upgrade installations in the different versions of PhocaGallery. In other words, each of the manual upgrade process has always been fine and dandy, and I never had to resort to using FTP. May I assume that all of the six tables (as opposed to only two tables in the earlier versions) will be present since I never came across any upgrade errors, and also since all of the five tabs "Rating", "Comments", "Statistics", "Geotagging" and "Upload" are present and working at the front end? Even if there were one or more tables missing, could the missing table(s) cause the problem as described? As my next post shows, I have checked all of the fields in each of the six tables against those listed in the file "install.bak", and they match perfectly. So, I assume that all six tables were correctly installed in the first place.

+++++++++++++++++++++++++++

(2) It is strange that com_content is involved, given that I have only ever encountered the quoted error message when I am using the PhocaGallery component at the front end. So, what is the function of "jos_content" here?

In addition, does "jos_content" have anything to do with the Phoca Gallery Category Description? I am asking the question here because I do use the Phoca Gallery Category Description to describe each Phoca Gallery Category, and I notice that the Description is always displayed first before the rest of the PhocaGallery component, as one would expect.

By the way, I cannot be certain whether the problem is confined to PhocaGallery version 2.10RC because I never tested the component thoroughly in versions 2.0X.

Let me quote the error message again:
DB function failed with error number 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 ': LIMIT 0,30' at line 1 SQL=SELECT `title` , `introtext` , `fulltext` FROM jos_content WHERE state = 1 AND catid=29: LIMIT 0,30
SQL =
SELECT `title` , `introtext` , `fulltext` FROM jos_content WHERE state = 1 AND catid=29: LIMIT 0,30
You can see from the quoted error message that "catid=29" is actually the 29th PhocaGallery category that I have created. I would like to repeat that I only ever encounter the quoted error message when I am using the PhocaGallery component at the front end. Moreover, the error message only appears when certain PhocaGallery categories are being viewed. And one of these is "catid=29" as appeared in the error message. The corresponding URL is .../index.php?option=com_phocagallery&view=category&id=29:families-&Itemid=92.

Strangely, everything seems to work even though the quoted error message is displayed at the top of the PhocaGallery component when some of the PhocaGallery categories are viewed at the front end. The quoted error message does not appear for many of the other PhocaGallery categories.

I do not understand how the quoted error message only happens to some PhocaGallery categories and not the others. After all, I created all of these PhocaGallery categories at the back end in much the same way.

Could the quoted error message have something to do with this version of PhocaGallery being only a Release Candidate and hence not fully stable? It would be interesting to see whether the problem would disappear when the version became stable.

Any thoughts or feedback?

SoundEagle

Re: 2.10RC: DB function failed with error number 1064

Posted: 13 Dec 2008, 03:30
by SoundEagle
Hi Jan,

For your information, I can see the following tables in the database with phpMyAdmin:

Code: Select all

jos_phocagallery
jos_phocagallery_categories
jos_phocagallery_comments
jos_phocagallery_user_category
jos_phocagallery_votes
jos_phocagallery_votes_statistics
In addition, I also checked all of the fields in each table against those listed in the file "install.bak", and they match perfectly.

Looking forward to your reply. Thank you.

Re: 2.10RC: DB function failed with error number 1064

Posted: 16 Dec 2008, 18:57
by Jan
Hi, the problem is, error is not in phoca gallery tables but in content tables:

jos_content


LIMIT 0,30' at line 1 SQL=SELECT `title` , `introtext` , `fulltext` FROM jos_content WHERE state = 1 AND catid=29: LIMIT 0,30

???

Re: 2.10RC: DB function failed with error number 1064

Posted: 17 Dec 2008, 01:31
by SoundEagle
What is causing the error in content tables, and how can it be fixed?

Assuming that the error is not in PhocaGallery, then why does the error only happen when PhocaGallery is used, and only happen to certain PhocaGallery categories?

Thanks.

Re: 2.10RC: DB function failed with error number 1064

Posted: 17 Dec 2008, 17:32
by Jan
the problem is I don't any idea where this sql query is taken from? do you use phoca gallery as plugin?

Re: 2.10RC: DB function failed with error number 1064

Posted: 18 Dec 2008, 01:09
by SoundEagle
Hi Jan,

I don't use PhocaGallery plugins. I only use the component and modules.

SoundEagle

Re: 2.10RC: DB function failed with error number 1064

Posted: 18 Dec 2008, 22:14
by Jan
so then it is more difficult because I don't have any idea where is this sql query comming for on your site ??? :-(

Jan