Код: Выделить всё
$this->execute("CREATE TRIGGER before_insert_links BEFORE INSERT ON links
DELETE FROM links WHERE time_to_live < CURRENT_TIMESTAMP;
END");
Код: Выделить всё
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 'DELETE FROM links WHERE time_to_live < CURRENT_TIMESTAMP;
END' at line 2