Hi --
I'm getting the [mysql error 1064] error when viewing some sub-albums but not others. The full error is below, and appears to be similar to what's already been reported at https://piwigo.org/forum/viewtopic.php?id=31818 a year ago.
I'm running MySQL version 8 on Dreamhost.
Is there anything for me to do?? (... that is, short of editing PHP, which I'm not at all confident about)
Thanks!
-----------------------------
Full error:
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 'ASC' at line 7
SELECT DISTINCT(image_id)
FROM piwigo_image_category
INNER JOIN piwigo_images ON id = image_id
WHERE
category_id = 14
ORDER BY rank ASC
; in /home/bdemchak/tpsoft.com/foto/include/dblayer/functions_mysqli.inc.php on line 847
Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /home/bdemchak/tpsoft.com/foto/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /home/bdemchak/tpsoft.com/foto/include/section_init.inc.php(317): query2array('\nSELECT DISTINC...', NULL, 'image_id') #1 /home/bdemchak/tpsoft.com/foto/index.php(12): include('/home/bdemchak/...') #2 {main} thrown in /home/bdemchak/tpsoft.com/foto/include/dblayer/functions_mysqli.inc.php on line 908
Environment
Piwigo 13.5.0 Check for upgrade
Installed on 21 July 2013, 9 years 6 months 1 week 4 days ago
Operating system: Linux
PHP: 7.4.30 (Show info) [2023-02-01 13:54:51]
MySQL: 8.0.28-0ubuntu0.20.04.3 [2023-02-01 13:54:51]
Graphics Library: ImageMagick 6.9.7-4
Cache size 444.54 Mo calculated 2 hours ago Refresh
Activated plugin list 6
Admin Tools
Fotorama
gdThumb
LocalFiles Editor
Take A Tour of Your Piwigo
VideoJS
Piwigo URL: http://tpsoft.com/foto/
Offline
Change the album sort order once to another order and then back to ranking.
Offline
Hi ...
Thanks!
Fair thought ...
When I click on the sub-album that's showing this problem, I get the 1064 error before I get a chance to set the sort order.
As an administrator, I can change the sort order in the page=albums. I have done that, and the ordering of albums in my list changes, but doesn't affect getting the 1064 error when I try to display the problem sub-album. I guess this setting is just for the list of albums. OK.
If use the administrator tools to manage the specific album (Albums | Manage + Edit Album pencil icon), I can change the order of photos in the sub-album page (... currently "manual order") to an "automatic order", then re-visit the album, I GET A GOOD DISPLAY ... no more error 1064.
If I then re-visit the sub-album's manage page and set the sort order back to "manual order", I still get a good display when I re-visit the album.
Thanks for this hint.
(The reason I wrote so much on this is so that others ... including me ... can solve this quickly next time.)
Thanks!
Offline