coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: achilleus on December 30, 2003, 06:31:29 PM

Title: There was an error while processing a database query.
Post by: achilleus 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:
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 :(
Title: There was an error while processing a database query.
Post by: Casper 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?
Title: There was an error while processing a database query.
Post by: MaThIbUs on December 30, 2003, 06:56:13 PM
It might be something with your MySQL database, as it says 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
Title: There was an error while processing a database query.
Post by: achilleus on December 30, 2003, 07:54:10 PM
QuoteWhat did you change in the 'content of main page'.
breadcrumb/catlist/alblist/lastalb,1/lastup,2/lastcom

QuoteWhat does it say in there now?
see line up

QuoteWhere 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.
Title: There was an error while processing a database query.
Post by: Casper 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.
Title: There was an error while processing a database query.
Post by: Casper on December 30, 2003, 08:27:00 PM
If that doesn't work, try the restore factory default button.
Title: There was an error while processing a database query.
Post by: SurfDude on December 30, 2003, 11:46:39 PM
Use the repair function for your database. I'm quite sure that will fix the problem.
Title: There was an error while processing a database query.
Post by: achilleus 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:
catlist/alblist/lastalb/lastup,2/lastcom

edit:
when I remove the lastalb from the content option the error message is gone
Title: There was an error while processing a database query.
Post by: ericfire on December 31, 2003, 09:14:41 PM
Here's a temporary fix:

In index.php, find this line:

           } // 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:

           } // 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.
Title: There was an error while processing a database query.
Post by: achilleus 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.
Title: There was an error while processing a database query.
Post by: Joachim Müller on January 04, 2004, 01:16:19 AM
created tracker #870156 (http://sourceforge.net/tracker/index.php?func=detail&aid=870156&group_id=89658&atid=590907) on this issue...

GauGau
Title: There was an error while processing a database query.
Post by: Tarique Sani 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
Title: There was an error while processing a database query.
Post by: Joachim Müller on January 08, 2004, 09:59:02 AM
tried the variants
Quotecatlist/alblist/lastalb/lastcom/lastup,2
and
Quotecatlist/alblist/lastalb/lastup,2/lastcom
with a dev branch checkout install. I can confirm Tarique's test: nothing unexpected happens - no errors appear!

GauGau
Title: There was an error while processing a database query.
Post by: Michael-CGC on January 13, 2004, 01:11:26 AM
I'm expriecing all an error when I put "lastalb" in my config.
Title: There was an error while processing a database query.
Post by: Michael-CGC on January 13, 2004, 01:19:40 AM
Quote from: "ericfire"Here's a temporary fix:

In index.php, find this line:

           } // 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