[mysql error 1064] 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 '' at line 16
SELECT
c.*,
user_representative_picture_id,
nb_images,
date_last,
max_date_last,
count_images,
nb_categories,
count_categories
FROM piwigo_categories c
INNER JOIN piwigo_user_cache_categories ucc
ON id = cat_id
AND user_id = 1
WHERE id_uppercat is NULL
ORDER BY rank
#1 my_error include\dblayer\functions_mysqli.inc.php(132)
#2 pwg_query include\category_cats.inc.php(55)
#3 include index.php(301)
As reported on [topic 29518](https://piwigo.org/forum/viewtopic.php?id=29518)
> [mysql error 1064] 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 '' at line 16
```
SELECT
c.*,
user_representative_picture_id,
nb_images,
date_last,
max_date_last,
count_images,
nb_categories,
count_categories
FROM piwigo_categories c
INNER JOIN piwigo_user_cache_categories ucc
ON id = cat_id
AND user_id = 1
WHERE id_uppercat is NULL
ORDER BY rank
#1 my_error include\dblayer\functions_mysqli.inc.php(132)
#2 pwg_query include\category_cats.inc.php(55)
#3 include index.php(301)
```
<!-- github-sync-id:487401393 -->
As opposed to 8e9cb6de23 I have added generic code in pwg_query to escape the rank word in any SQL query.
That's not perfect, but less impact on code.
As opposed to 8e9cb6de23928b590912c71c3713ecfa17608d7c I have added generic code in `pwg_query` to escape the `rank` word in any SQL query.
That's not perfect, but less impact on code.
<!-- github-comment-id:526545456 -->
I had an issue with the key word 'groups' and fixed is as described in my comment https://github.com/Piwigo/AMenuManager/issues/5#issuecomment-551291566
<!-- github-comment-id:551296756 -->
adam
changed title from [2.10.0RC1] rank is still an issue with MySQL 8 to [2.10.0RC1] rank is still an issue with MySQL 8 2026-10-27 11:14:19 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
As reported on topic 29518
As opposed to
8e9cb6de23I have added generic code inpwg_queryto escape therankword in any SQL query.That's not perfect, but less impact on code.
i have this issues too
I had an issue with the key word 'groups' and fixed is as described in my comment https://github.com/Piwigo/AMenuManager/issues/5#issuecomment-551291566
[2.10.0RC1] rank is still an issue with MySQL 8to [2.10.0RC1] rank is still an issue with MySQL 8