Getting this error while editing my photos

Hi I’m suddenly getting this error.?!
While editing my photos (adding tags/keywords) I suddenly get this error message and now I cannot do anything anymore.
I have already restarted the container and also the Mariadb container. But still the same error.
Any idea how to solve this?

Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3

  FROM piwigo_categories
  WHERE id = 
; in /config/www/gallery/include/dblayer/ on line 856

Fatal error: Uncaught Error: Call to a member function fetch_row() on bool in /config/www/gallery/include/dblayer/ Stack trace: #0 /config/www/gallery/admin/batch_manager.php(476): pwg_db_fetch_row(false) #1 /config/www/gallery/admin.php(309): include('/config/www/gal...') #2 {main} thrown in /config/www/gallery/include/dblayer/ on line 225

Looks like a piwigo specific error to me, I’d check on their forums to see if anyone else has experienced the issue. I assume you can still browse your piwigo instance ok?

Thanks, it is working again.
After clearing all the caches (in piwigo) and use the repair database function (within piwigo) everything is fine again.