forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Walkinman on April 07, 2011, 11:38:31 pm

Title: Database Query error
Post by: Walkinman on April 07, 2011, 11:38:31 pm
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:

Code: [Select]
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 (http://www.skolaiimages.com/stock/thumbnails-93-Grizzly-Bear-cub-photos.html) the first thumbnail on the page gives this error:

see here (http://www.skolaiimages.com/stock/displayimage-93-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html)

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
Title: Re: Database Query error
Post by: Αndré on April 08, 2011, 08:53:04 am
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: error
http://www.skolaiimages.com/stock/displayimage-93-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html
Quote from: works
http://www.skolaiimages.com/stock/displayimage-93-5883--Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html
Title: Re: Database Query error
Post by: Walkinman on April 08, 2011, 08:28:15 pm
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