Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Sorting "most viewed" critical error  (Read 2568 times)

0 Members and 1 Guest are viewing this topic.

frank61

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Sorting "most viewed" critical error
« 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

Logged

frank61

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Sorting "most viewed" critical error
« Reply #1 on: July 24, 2010, 04:03:56 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
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.