coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Pascal YAP on February 22, 2005, 09:32:32 AM

Title: Search.php Critical Error
Post by: Pascal YAP on February 22, 2005, 09:32:32 AM
Bonjour all,
(CPG 1.3.2)

   I have a small problem with my search.php who answer each time a Critical Error.
Only one answer : "There was an error while processing a database query."
The CPG Debug-Mod said :
While executing query "SELECT COUNT(*) FROM CPG_pictures WHERE () AND ctime > UNIX_TIMESTAMP() - 0 AND ctime < UNIX_TIMESTAMP() - 0 " 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 ') AND ctime > UNIX_TIMESTAMP() - 0 AND ctime < UNIX_TIMESTAMP()


UPDATE.php do not fix this problem at all.
What's wrong, i cannot find and fix this Critical Error  ???

Thanx for your HELP

PYAP
Title: Re: Search.php Critical Error
Post by: Joachim Müller on February 24, 2005, 09:17:31 AM
Try checking out the most recent version of search.php from the stable branch of the CVS and see if this cures your problem.

Joachim
Title: Re: Search.php Critical Error
Post by: Pascal YAP on February 24, 2005, 10:28:42 AM
Gaugau,

I try to dowload a fresh SEARCH.PHP in CVS stable branche....and nothing new after :-(
It's really a db problem not localized yet !

Because with differents personnal SEARCH.PHP the CRITICAL ERROR stay as answer...

PYAP
Title: Re: Search.php Critical Error
Post by: Joachim Müller on February 24, 2005, 11:04:53 AM
the problem is the empty WHERE block. Try finding the code line and see what it contains - maybe it's something with your db...

Joachim
Title: Re: Search.php Critical Error
Post by: Nibbler on February 24, 2005, 06:36:14 PM
You are using dev code. All the important search stuff is in include/search.inc.php. It is that file you need to replace with search.inc.php from the stable branch of CVS.
Title: Re: Search.php Critical Error
Post by: Pascal YAP on February 24, 2005, 11:05:10 PM
Ah ah Nibbler, (-;

Your are the Copper-King, and me, only the Mystake-King

K-Thanx Nibbler and Gau² all is all right now......

PYAP