Database Query error Database Query error
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Database Query error

Started by Walkinman, April 07, 2011, 11:38:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Walkinman

Hey Folks,

I suspect this is a server-side error, not a coppermine error, but wanted to verify it. I'm getting this error on SOME files:

While executing query 'SELECT cid FROM CPG_categories WHERE lft BETWEEN  AND ' in include/functions.inc.php on line 54

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' at line 1


From this gallery the first thumbnail on the page gives this error:

see here

However .. if I search by filename, I can access the file:

http://www.skolaiimages.com/stock/thumbnails.php?search=09_SEP3684.jpg&submit=search&album=search&title=on&newer_than=&caption=on&older_than=&keywords=on&filename=on&type=AND

That search gives me the thumbnail, and I can click on it and open the image just fine:

http://www.skolaiimages.com/stock/displayimage-search-0-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html

I've contacted my webhost, but want to make sure this isn't a function of some of the recent changes I've had made to the coppermine files first.

Thank you.

Cheers

Carl

Αndré

Please disable the sef_url plugin, as I assume the starting digit of the title confuses the plugin. If I manually remove it from the url, it works as expected:
Quote from: errorhttp://www.skolaiimages.com/stock/displayimage-93-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html
Quote from: workshttp://www.skolaiimages.com/stock/displayimage-93-5883--Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html

Walkinman

Hey André

Ahh, that's it, thank you. I just removed the character "2" from the title and now it works fine. I'll just make sure I don't have any titles start with a number and hopefully have no more problems with it.

Thank you.

Cheers

Carl