forum.coppermine-gallery.net
Support => Older/other versions => cpg1.3.x Support => Topic started by: dj_jojo on November 16, 2005, 04:13:20 pm
-
when i try to select a category to show albums the gallery returns critical error :S
While executing query "SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg134_albums as a LEFT JOIN cpg134_pictures as p ON a.thumb=p.pid WHERE category=8 ORDER BY a.posLIMIT 0,1" on 0
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 '0,1' at line 1
any suggestions and help.
Regards
D.
-
The problem is
a.posLIMIT
in the query. There should be a space between a.pos and LIMIT i.e. it should be
a.pos LIMIT
Did you modified any files? If so then correct the query in that file.
-
hmm.. no i have only changed some of the Language files..... i'll try to overwrite functions file.
do you have any clue about which file could be causing the error beside the functions file?
regards
Dragan
-
It's in index.php here:
$sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '.
'filename, url_prefix, pwidth, pheight '.
'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '.
'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '.
'ON a.thumb=p.pid '.
'WHERE category='.$cat.$album_filter.
' ORDER BY a.pos '.
$limit;
Should be easy to fix, just add in a space.
-
;D
well done boys :o ; you have both earned a bottle of beer ;)
muchos gracias
Regards
D.