Projects ⇒ Bugs ⇒ #515: Random slideshow get SQL error ⇒ CPG Dragonfly™ CMS
Bug #515 Random slideshow get SQL error
Project: Dragonfly 9.0.3 -> 9.3 Category: Coppermine
Submitted: Sunday, May 22, 2005 (10:37:17) Modified: Wednesday, July 06, 2005 (01:08:16)
Status: Closed Assigned to: akamu
PHP Version: 5.0.3 HTTPD Server: Apache 2.0
Votes: 4
Vote results:
Avg. Score: 3.8 ± 1.3 Reproduced: 4 of 4 (100.0%)
Same PHP Version: 1 (25.0%) Same HTTPD Server: 1 (25.0%)

View/Vote Add Comment

by: Pitcher
Description:
------------
On /coppermine/displayimage/meta=random/album=1/pid=2/slideshow=5000.html
While executing query "SELECT pid, filepath, filename, p.title, keywords, url_prefix, filesize, pwidth, pheight, ctime, p.aid, p.aid FROM nuke_cpg_pictures AS p INNER JOIN nuke_cpg_albums AS a ON (p.aid = a.aid AND visibility IN (0,3) AND a.aid = 1) WHERE approved='YES' GROUP BY p.pid ORDER BY RAND() LIMIT -1"

the following error occured: 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 '-1' at line 1

In: includes/coppermine/functions.inc on line: 566
by: Pitcher
This seems to be an MySQL 4.1 problem with negative values for limit and emty tables. I'm not sure if this is a bug or if they just changed the way of use...
by: Purus
Googlebot keeps hitting my random slideshow and
generating SQL Error emails. I am getting about 10 per
day, and it is really annoying.
by: musox
I'm getting about 12/day as well. Using PHP 4.3.11, MySQL 4.1.7 and Apache/1.3.33.
by: dazamc
It started happening to me right after I enabled Activate Link Engine Optimization (LEO).

MySQL version 4.1.11-standard-log
PHP version 4.3.10
Apache version 1.3.33 (Unix)

Message from Dragonfly below:
On /web/coppermine/displayimage/meta=random/album=3/pid=26/slideshow=5000.html
While executing query "SELECT pid, filepath, filename, p.title, keywords, url_prefix, filesize, pwidth, pheight, ctime, p.aid, p.aid FROM cms_cpg_pictures AS p INNER JOIN cms_cpg_albums AS a ON (p.aid = a.aid AND visibility IN (0,3) AND a.aid = 3) WHERE approved='YES' GROUP BY p.pid ORDER BY RAND() LIMIT -1"

the following error occured: 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 '-1' at line 1

In: /home/recreati/public_html/web/includes/coppermine/functions.inc on line: 563

Guest information:
User id: 1
Username: Anonymous
Admin: No
IP: 68.142.249.46
Host: lj2036.inktomisearch.com
by: akamu
This bug has been fixed in the CVS.

Snapshots of the sources are packaged every 6 hours; this change
will be in the next snapshot. You can grab the snapshot at the
Downloads section.

Thank you for the report, and for helping us to make CPG-Nuke 9.0.3 -> 9.1 better.

/cvs/html/modules/coppermine/displayimage.php,v <-- displayimage.php
new revision: 9.3;
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español