dimanche 26 juin 2016

Update table1 column if table2.date > NOW()

How can i update specific column in table1 only when table2.date is >= NOW(). I tried

UPDATE table1 JOIN table2 ON (table1.ownerid = table2.ownerid) SET table.test = 'disabled' WHERE FROM_UNIXTIME(table2.dateto) <= NOW();

But its seems to now work and no error at all

Aucun commentaire:

Enregistrer un commentaire