Sorting "most viewed" critical error Sorting "most viewed" critical error
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Sorting "most viewed" critical error

Started by frank61, July 24, 2010, 03:52:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

frank61

Hello,

When I sort the files by "most viewed" and I click for the some file at the end of the list, I got an error

Critical error
There was an error while processing a database query
File: .../include/functions.inc.php - Line: 258


Debug say:
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, user1, user2, user3
               FROM cpg14x_pictures AS r
               INNER JOIN cpg14x_albums AS a ON a.aid = r.aid
               INNER JOIN cpg14x_categories AS c2 ON c2.cid = category WHERE (c2.lft BETWEEN 1 AND 2 OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%')
               AND approved = 'YES'
               AND hits > 0
               ORDER BY hits ASC, pid DESC
                LIMIT 0 ,-640' in include/functions.inc.php on line 1593
mySQL error: Something is wrong in your syntax bl�zko '-640' na riadku 8


Prefix of tables is cpg14x_albums, I upgraded from 1.4.27

There are so much result for "There was an error while processing a database query" - but for 1.4.x and none for 1.5.x.
So i make a new thread.

CPG is at:
http://www.photoportal.sk

Already sorted album by most viewed (example):
http://www.photoportal.sk/thumbnails.php?album=topn&cat=4

And a link to a last file in the list (sample, without debug - only for admin):
http://www.photoportal.sk/displayimage.php?album=topn&cat=4&pid=1000001305#top_display_media

There is no error sorting files by "last comment, last uploads or top rated". There is an error sorting by "most viewed" only.

Was there any fault in my ugrading CPG (old prefix is kept) or in database query?

Thanks for advice
Frank


frank61

Quote from: frank61 on July 24, 2010, 03:52:53 PM
Hello,

When I sort the files by "most viewed" and I click for the some file at the end of the list, I got an error

Critical error
There was an error while processing a database query
File: .../include/functions.inc.php - Line: 258


Debug say:
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, user1, user2, user3
               FROM cpg14x_pictures AS r
               INNER JOIN cpg14x_albums AS a ON a.aid = r.aid
               INNER JOIN cpg14x_categories AS c2 ON c2.cid = category WHERE (c2.lft BETWEEN 1 AND 2 OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%' OR keywords like '%amark%')
               AND approved = 'YES'
               AND hits > 0
               ORDER BY hits ASC, pid DESC
                LIMIT 0 ,-640' in include/functions.inc.php on line 1593
mySQL error: Something is wrong in your syntax bl�zko '-640' na riadku 8


Prefix of tables is cpg14x_albums, I upgraded from 1.4.27

There are so much result for "There was an error while processing a database query" - but for 1.4.x and none for 1.5.x.
So i make a new thread.

CPG is at:
http://www.photoportal.sk

Already sorted album by most viewed (example):
http://www.photoportal.sk/thumbnails.php?album=topn&cat=4

And a link to a last file in the list (sample, without debug - only for admin):
http://www.photoportal.sk/displayimage.php?album=topn&cat=4&pid=1000001305#top_display_media

There is no error sorting files by "last comment, last uploads or top rated". There is an error sorting by "most viewed" only.

Was there any fault in my ugrading CPG (old prefix is kept) or in database query?

Thanks for advice
Frank



Ther is a topic already solved
http://forum.coppermine-gallery.net/index.php/topic,65939.0.html