samedi 4 juillet 2015

MySQL schedule update syintax wrong?

I'm trying to set a trigger in my MySQL database, so I'm using this query

CREATE 
EVENT pwdupdate
ON SCHEDULE EVERY 3 MINUTE
DO
    UPDATE 'passwords'
    SET 'pass'= SUBSTRING((RAND())

Basically I want it to update the pass field of a table with a random string, but it keeps telling me that there's a syintax 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 ''passwords'
    SET 'pass'= SUBSTRING((RAND())' at line 5 

Any help ?




Aucun commentaire:

Enregistrer un commentaire