Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: There was an error while processing a database query.  (Read 12409 times)

0 Members and 1 Guest are viewing this topic.

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
There was an error while processing a database query.
« 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
Logged

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
Re: There was an error while processing a database query.
« Reply #1 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
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query.
« Reply #2 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.
Logged

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
Re: There was an error while processing a database query.
« Reply #3 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
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query.
« Reply #4 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.
Logged

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
Re: There was an error while processing a database query.
« Reply #5 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
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query.
« Reply #6 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).
Logged

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
Re: There was an error while processing a database query.
« Reply #7 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
Logged

911Patches

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • www.911Patches.com
Re: There was an error while processing a database query.
« Reply #8 on: February 26, 2006, 11:55:38 pm »

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

azism

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • TI99ers On-Line User Group
Re: There was an error while processing a database query.
« Reply #9 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...

Quote
Initializing 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: There was an error while processing a database query.
« Reply #10 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.
Logged

azism

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • TI99ers On-Line User Group
Re: There was an error while processing a database query.
« Reply #11 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!  :)
Logged

azism

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • TI99ers On-Line User Group
Re: There was an error while processing a database query.
« Reply #12 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!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.