[mysql error 1064] You have an error in your SQL syntax #943

Closed
opened 2026-10-05 00:24:50 +02:00 by adam · 1 comment
Owner

[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)

Piwigo:2.10.0RC1
Ubuntu:18.04
Nginx:1.16.1
PHP:7.3.10
Mysql:8.0.17

[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) > Piwigo:2.10.0RC1 > Ubuntu:18.04 > Nginx:1.16.1 > PHP:7.3.10 > Mysql:8.0.17 <!-- github-sync-id:499799771 -->
adam closed this issue 2026-10-05 00:24:50 +02:00
Author
Owner

Piwigo 2.10.0 fixes this problem. rank has become a reserved keyword with MySQL 8.

Piwigo 2.10.0 fixes this problem. `rank` has become a reserved keyword with MySQL 8. <!-- github-comment-id:541305368 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#943