Warning: [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 ', status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank AS' at line 1
SELECT id, name, permalink, dir, rank, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank ASC
; in D:\www_root\piwigo-2.9.4\include\dblayer\functions_mysqli.inc.php on line 845
piwigo version: 2.9.4 mysql version: 8.0.11
Warning: [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 ', status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank AS' at line 1
SELECT id, name, permalink, dir, **rank**, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank ASC
; in D:\www_root\piwigo-2.9.4\include\dblayer\functions_mysqli.inc.php on line 845
**piwigo version: 2.9.4**
**mysql version: 8.0.11**
<!-- github-sync-id:354007605 -->
I've attempted to find all the places using rank and added backticks: #922
There's also the album 'Manual sort order' that gets saved as "rank ASC" and then I think appended to an SQL query when it's loaded. I might be wrong about that though.
`rank` is a reserved word as of MySQL 8.0.
I've attempted to find all the places using `rank` and added backticks: #922
There's also the album 'Manual sort order' that gets saved as "rank ASC" and then I think appended to an SQL query when it's loaded. I might be wrong about that though.
<!-- github-comment-id:417196571 -->
There are also column named "name" and "status" which are reserved words:
SELECT id, name, permalink, dir, rank, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank
There are also column named "name" and "status" which are reserved words:
SELECT id, name, permalink, dir, rank, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank
<!-- github-comment-id:418552783 -->
@UnConundrum are you getting errors with them? With MySQL 8.0 as well?
I guess best practice would be to quote every column name.
@UnConundrum are you getting errors with them? With MySQL 8.0 as well?
I guess best practice would be to quote every column name.
<!-- github-comment-id:418560237 -->
Yes, I am.
I guess it’s unrelated, but I’m also getting a JSON error.
> On Sep 4, 2018, at 8:30 PM, Sam Wilson <notifications@github.com> wrote:
>
> @UnConundrum <https://github.com/UnConundrum> are you getting errors with them? With MySQL 8.0 as well?
>
> I guess best practice would be to quote every column name.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <https://github.com/Piwigo/Piwigo/issues/919#issuecomment-418560237>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAwKoIuJ8aGyF06yKVyg0Q3dv0RNsfLrks5uXxsRgaJpZM4WMXHp>.
>
<!-- github-comment-id:418568134 -->
I gave a general reply about the "reserved keywords in MySQL 8" on https://github.com/Piwigo/Piwigo/issues/996#issuecomment-479804890
<!-- github-comment-id:479807598 -->
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.
Warning: [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 ', status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank AS' at line 1
SELECT id, name, permalink, dir, rank, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank ASC
; in D:\www_root\piwigo-2.9.4\include\dblayer\functions_mysqli.inc.php on line 845
piwigo version: 2.9.4
mysql version: 8.0.11
rankis a reserved word as of MySQL 8.0.I've attempted to find all the places using
rankand added backticks: #922There's also the album 'Manual sort order' that gets saved as "rank ASC" and then I think appended to an SQL query when it's loaded. I might be wrong about that though.
There are also column named "name" and "status" which are reserved words:
SELECT id, name, permalink, dir, rank, status
FROM piwigo_categories
WHERE id_uppercat IS NULL
ORDER BY rank
@UnConundrum are you getting errors with them? With MySQL 8.0 as well?
I guess best practice would be to quote every column name.
Yes, I am.
I guess it’s unrelated, but I’m also getting a JSON error.
Any chance this will be worked on in the near future?
I'm not sure.
@plegall might know.
Add 'section' to it.
I gave a general reply about the "reserved keywords in MySQL 8" on https://github.com/Piwigo/Piwigo/issues/996#issuecomment-479804890
Error on admin user page with mysql 8 https://github.com/Piwigo/Piwigo/issues/1095