mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Quote 'rank' field name in SQL
Add backticks to reserved word 'rank' in SQL queries. Bug: GH #919
This commit is contained in:
committed by
Pierrick Le Gall
parent
af85a62199
commit
8e9cb6de23
@@ -143,11 +143,11 @@ SELECT
|
||||
representative_ext,
|
||||
width, height, rotation,
|
||||
name,
|
||||
rank
|
||||
`rank`
|
||||
FROM '.IMAGES_TABLE.'
|
||||
JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id
|
||||
WHERE category_id = '.$page['category_id'].'
|
||||
ORDER BY rank
|
||||
ORDER BY `rank`
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
if (pwg_db_num_rows($result) > 0)
|
||||
|
||||
Reference in New Issue
Block a user