coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: 911Patches on February 26, 2006, 11:02:16 PM

Title: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:02:16 PM
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
Title: Re: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:24:48 PM
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
Title: Re: There was an error while processing a database query.
Post by: Nibbler on February 26, 2006, 11:32:40 PM
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.
Title: Re: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:41:22 PM
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
Title: Re: There was an error while processing a database query.
Post by: Nibbler on February 26, 2006, 11:42:28 PM
Replace them all using find/replace in your text editor and then import the file using phpmyadmin.
Title: Re: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:43:58 PM
I do not have phpmyadmin.
what do I have to do to use that?
Sorry about all these questions.
matt
Title: Re: There was an error while processing a database query.
Post by: Nibbler on February 26, 2006, 11:46:41 PM
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).
Title: Re: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:49:57 PM
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
Title: Re: There was an error while processing a database query.
Post by: 911Patches on February 26, 2006, 11:55:38 PM
OK, I installed pafiledb3 and
now I do not know how I add the file??
Title: Re: There was an error while processing a database query.
Post by: azism on March 06, 2006, 07:24:34 PM
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?
Title: Re: There was an error while processing a database query.
Post by: Joachim Müller on March 06, 2006, 07:58:01 PM
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.
Title: Re: There was an error while processing a database query.
Post by: azism on March 06, 2006, 09:53:01 PM
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!  :)
Title: Re: There was an error while processing a database query.
Post by: azism on March 08, 2006, 04:18:38 PM
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!