Hello,
I just updated my instance on the master branch and the creation of the 4 MySQL triggers is always failing.
https://github.com/photo/frontend/blob/master/src/configs/upgrade/db/mysql/mysql-4.0.1.phpFor example, with this code:
"""
CREATE TRIGGER update_album_counts_on_delete AFTER DELETE ON op_elementAlbum
FOR EACH ROW
BEGIN
SET @countPublic=(SELECT COUNT(*) FROM op_photo AS p INNER JOIN op_elementAlbum AS ea ON
p.id = ea.element WHERE ea.owner=OLD.owner AND ea.album=OLD.album AND p.owner=OLD.owner AND p.permission='1');
SET @countPrivate=(SELECT COUNT(*) FROM op_photo AS p INNER JOIN op_elementAlbum AS ea ON
p.id = ea.element WHERE ea.owner=OLD.owner AND ea.album=OLD.album AND p.owner=OLD.owner);
UPDATE op_album SET countPublic=@countPublic, countPrivate=@countPrivate WHERE owner=OLD.owner AND id=OLD.album;
END
"""
MySQL returns:
"""
#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 4"""
I tried by replacing p.permission='1' by p.permission=1. But this changes nothing. Isn't "p.permission" supposed to be an integer?
Any idea?
For the rest all is working fine except the fact that
when I click the link (New Feature On This Page), nothing happens.thanks,
Cédric