There was an error while processing a database query. There was an error while processing a database query.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

There was an error while processing a database query.

Started by 911Patches, February 26, 2006, 11:02:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

911Patches

I just upgraded to Coppermine 1.4.4
and it says this:

While executing query "SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg_130albums AS a  LEFT JOIN cpg_130pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN ()GROUP BY a.aid" on 0

mySQL error: 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 ')GROUP BY a.aid' at line 1

Please help. I am new and need to get my photogallery back up and running.
Thanks in advance
matt

www.911Patches.com/patchgallery

911Patches

I initially hit the restore factory settings in the 1.3.3 version.
Coppermine admin told me to upgrade to 1.4.4.
That did not help.
Any ideas?
Thanks
matt

Nibbler

By the looks of things your config table is empty. Open sql/basic.sql with a text edit, replace CPG_ with cpg_130, save it and import it with phpmyadmin. That will repopulate the table.

911Patches

There are many of the CPG_config values
and
CPG_bridge VALUES
and
CPG_filetypes

do I chage all those?

and will w ftp to my server work?

matt

Nibbler

Replace them all using find/replace in your text editor and then import the file using phpmyadmin.

911Patches

I do not have phpmyadmin.
what do I have to do to use that?
Sorry about all these questions.
matt

Nibbler

It may already be provided by your host, if not you'd need to install it from phpmyadmin.net (or any other db admin tool).

911Patches

That did not work?
Any other ideas?
This is all because I hot the restore factory defaults under the config.
This has never happened to anyone else?
matt

911Patches

OK, I installed pafiledb3 and
now I do not know how I add the file??

azism

I did an upgrade (via Fantastico) from 1.3.4 to 1.4.2. The upgrade generated the following:
Upgrading...

QuoteInitializing Parameters - Done.
Generating MySQL Backup - Done.
Generating Files Backup - Done.ALTER TABLE `cpg_pictures` ADD `lasthit_ip` TINYTEXT - Duplicate column name 'lasthit_ip'

Now when I access Coppermine, I get the error There was an error while processing a database query which was not totally unexpected. The field lasthit_ip are all filled with Null values.

Any idea how to fix this?

Joachim Müller

don't use Fantastico, it's buggy. Upgrade to the most recent version (currently cpg1.4.4) doing exactly as suggested in the docs that come with it. Don't try hijacking other's threads, your Fantastico issues are not related. However, in this thread you should find the information needed to enable debug_mode to see the actual error message.

azism

Thank goodness for doing a backup first. I will restore back to where I was and then do as you suggest. Thanks for the prompt reply!  :)

azism

Got everything back. Found that the Fantastico upgrade added some extra line items to the tables. After removing these line items, I was back in business. Weird, but it work for me. It took some time going through the schema.sql printout and the actual tables, but it worked. Can't guarantee it will work for others. In any event, backup the databse before doing anything!!! Can't emphasize that enough!