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

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

Main Menu

There was an error while processing a database query.

Started by achilleus, December 30, 2003, 06:31:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

achilleus

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 :(

Casper

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

What does it say in there now?
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

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

achilleus

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.

Casper

Try getting rid of the ,1 after the lastalb.

I don't know if that would affect it.
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

If that doesn't work, try the restore factory default button.
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

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

achilleus

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

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).') ';


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.

achilleus

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.

Joachim Müller


Tarique Sani

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

Joachim Müller

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

Michael-CGC

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

Michael-CGC

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