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 8455 times)

0 Members and 1 Guest are viewing this topic.

achilleus

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
There was an error while processing a database query.
« on: December 30, 2003, 06:31:29 pm »

Hi.

Sorry for my english :(.
I've installed the version 1.2 of the photo gallery on my server yesterday.
It worked very fine and so on I've uploaded all the Albums I wanted.

Now all these work is done and the gallery were configured. Then I changed a little think of the MainPage in the config area (The content of the main page) and till then I can't switch anymore in a group. All other things i can do (see Pictures, add albums etc) and the mainpage work fine.

Several minutes ago I installed the newest version (1.2.1), but the problem is still there.

Here is what i get, when i click on a group:

There was an error while processing a database query.

Debug message:
Code: [Select]
While executing query "SELECT c.pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, msg_id, author_id, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, aid FROM cpg11d_comments as c, cpg11d_pictures as p WHERE approved = 'YES' AND c.pid = p.pid AND cpg11d_pictures.aid IN (26,68,7,14,20,11,19,15,24,18,21,22,23,27,29,30,31,32,33,34,35,36,37,38,41,70,43,50,45,46,47,48,49,51,52,69,65,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91)  ORDER by msg_id DESC  LIMIT 0 ,4" on 0

mySQL error: Unknown table 'cpg11d_pictures' in where clause


Can anybody help me ?! I don't want to upload the 1850 pictures again :(
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
There was an error while processing a database query.
« Reply #1 on: December 30, 2003, 06:43:23 pm »

What did you change in the 'content of main page'.

What does it say in there now?
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MaThIbUs

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • I rock.
    • http://mathibus.com/
There was an error while processing a database query.
« Reply #2 on: December 30, 2003, 06:56:13 pm »

It might be something with your MySQL database, as it says
Code: [Select]
mySQL error: Unknown table 'cpg11d_pictures' in where clauseWhere did your cpg11d_pictures table go?

I don't think you'll have to re-upload all those images, it seems to me like this is a problem with the database and not with the files.

/m_aTh!bUs
Logged

achilleus

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
There was an error while processing a database query.
« Reply #3 on: December 30, 2003, 07:54:10 pm »

Quote
What did you change in the 'content of main page'.

breadcrumb/catlist/alblist/lastalb,1/lastup,2/lastcom

Quote
What does it say in there now?

see line up

Quote
Where did your cpg11d_pictures table go?

I've installed myphpadmin to see, what happened with the table.

The Table is in the Database and contains picture information.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
There was an error while processing a database query.
« Reply #4 on: December 30, 2003, 08:24:46 pm »

Try getting rid of the ,1 after the lastalb.

I don't know if that would affect it.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
There was an error while processing a database query.
« Reply #5 on: December 30, 2003, 08:27:00 pm »

If that doesn't work, try the restore factory default button.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

SurfDude

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
    • http://surfdude.student.utwent.nl
There was an error while processing a database query.
« Reply #6 on: December 30, 2003, 11:46:39 pm »

Use the repair function for your database. I'm quite sure that will fix the problem.
Logged
Frans AKA SurfDude || My Gallery

achilleus

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
There was an error while processing a database query.
« Reply #7 on: December 31, 2003, 12:44:27 am »

the repair function did a good job :)

but when I put "lastalb" in the content mainpage config the error is there again.

complete content of mainpage:
Code: [Select]
catlist/alblist/lastalb/lastup,2/lastcom

edit:
when I remove the lastalb from the content option the error message is gone
Logged

ericfire

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
There was an error while processing a database query.
« Reply #8 on: December 31, 2003, 09:14:41 pm »

Here's a temporary fix:

In index.php, find this line:

Code: [Select]
           } // while
                $FORBIDDEN_SET = "AND p.aid NOT IN (".substr($set, 0, -1).') ';
                $ALBUM_SET .= 'AND aid NOT IN ('.substr($set, 0, -1).') ';


and comment it out so it looks like this:

Code: [Select]
           } // while
                $FORBIDDEN_SET = ""; //"AND p.aid NOT IN (".substr($set, 0, -1).') ';
                //$ALBUM_SET .= 'AND aid NOT IN ('.substr($set, 0, -1).') ';


Should fix your problem. But unapproved albums will be viewable in the lastalb album.
Logged

achilleus

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
There was an error while processing a database query.
« Reply #9 on: January 03, 2004, 08:47:26 pm »

hi again.
I've tested a little bit without the modification.
The Error happens only in some given orders of the content.

This order works fine now:
catlist/alblist/lastcom/lastalb/lastup,2

This works fine too:
catlist/alblist/lastup,2/lastcom/lastalb

but orders like
catlist/alblist/lastalb/lastcom/lastup,2
or
catlist/alblist/lastalb/lastup,2/lastcom

are ending with the error.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
There was an error while processing a database query.
« Reply #10 on: January 04, 2004, 01:16:19 am »

created tracker #870156 on this issue...

GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
There was an error while processing a database query.
« Reply #11 on: January 08, 2004, 09:06:14 am »

Could not be replicated on my system. I will make this as bogus if not other info comes in till Monday
Logged
SANIsoft PHP applications for E Biz

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
There was an error while processing a database query.
« Reply #12 on: January 08, 2004, 09:59:02 am »

tried the variants
Quote
catlist/alblist/lastalb/lastcom/lastup,2
and
Quote
catlist/alblist/lastalb/lastup,2/lastcom
with a dev branch checkout install. I can confirm Tarique's test: nothing unexpected happens - no errors appear!

GauGau
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
There was an error while processing a database query.
« Reply #13 on: January 13, 2004, 01:11:26 am »

I'm expriecing all an error when I put "lastalb" in my config.
Logged

Michael-CGC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
There was an error while processing a database query.
« Reply #14 on: January 13, 2004, 01:19:40 am »

Quote from: "ericfire"
Here's a temporary fix:

In index.php, find this line:

Code: [Select]
           } // while
                $FORBIDDEN_SET = "AND p.aid NOT IN (".substr($set, 0, -1).') ';
                $ALBUM_SET .= 'AND aid NOT IN ('.substr($set, 0, -1).') ';


I can't find that code in my index.php. Are sure it is there?

Michael
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 19 queries.