forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: pavelh on July 19, 2010, 10:27:28 am
-
Hello,
in my photogallery, in some albums: if I open the album and click to most viewed and then click to thumbnail, the critical error is displayed.
http://www.klatovy.net/fotogalerie/thumbnails.php?album=topn&cat=-2504
While executing query 'SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id, pic_raw_ip, pic_hdr_ip
FROM foto_pictures AS r
INNER JOIN foto_albums AS a ON a.aid = r.aid
WHERE (r.aid = 2504)
AND approved = 'YES'
AND hits > 0
ORDER BY hits ASC, pid DESC
LIMIT 0 ,-186' in include/functions.inc.php on line 1593
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 '-186' at line 8
I would guess - there could be a missing apostrophe in this line: LIMIT 0 ,-186'
If I displayed most viewed pictures in category, error is not displayed. Only in album.
Thanx, Pavel.
-
Already fixed in svn. See that (http://forum.coppermine-gallery.net/index.php/topic,65939.0.html) topic.
-
Already fixed in svn. See that (http://forum.coppermine-gallery.net/index.php/topic,65939.0.html) topic.
I'm having the same problem and clicked on your link but don't see any solution to the problem. Any help would be appreciated.
-
Please upgrade to cpg1.5.8.
-
Please upgrade to cpg1.5.8.
Thank you.
-
Marking as solved.
-
Already fixed in svn. See that (http://forum.coppermine-gallery.net/index.php/topic,65939.0.html) topic.
I have latest coppermine installed:
Coppermine version: 1.5.16
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/include/functions.inc.php (https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/include/functions.inc.php) $
$Revision: 8243 $
But still have same problem - negative limits in SQL like this: ORDER BY r.pid ASC LIMIT 0 ,-231
While executing query 'SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
FROM cpg_pictures AS r
INNER JOIN cpg_albums AS a ON a.aid = r.aid
WHERE (category = 14715) AND r.aid NOT IN (193, 301, 161, 114, 386, 53, 64, 86, 85, 91, 93, 94, 96, 97, 84, 121, 105, 108, 141, 143, 40, 196, 198, 203, 206, 217, 220, 20, 232, 236, 242, 271, 252, 253, 255, 258, 272, 285, 289, 295, 345, 207, 224, 259, 291, 584, 378, 411, 442, 732, 444, 456, 470, 590, 492, 493, 494, 502, 521, 535, 538, 550, 556, 569, 580, 592, 596, 598, 601, 638, 645, 648, 654, 693, 666, 677, 695, 698, 700, 701, 703, 705, 706, 707, 708, 709, 710, 711, 715, 725, 726, 727, 731)
AND approved = 'YES'
ORDER BY r.pid ASC LIMIT 0 ,-231' in include/functions.inc.php on line 1501 the following error was encountered:
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 '-231' at line 6
How fix it?
Thank you
-
KB.cpg, please start a new thread that contains more information. E.g. we need a link to your gallery and an explanation where the occurs exactly. It seems that the 'lastup' meta album is affected in your case, which differs from the initial error.
Closing.