Basically I have a column called “ispushed”. Whenever a button on the webpage is pushed all values in that column should be reset to zero except for the row I’m updating, that one should be set to 1.
Something like this
CREATE TRIGGER `TR_ispushed` BEFORE UPDATE on `questions`
FOR EACH ROW BEGIN
UPDATE questions set questions.`ispushed` = 0
WHERE id <> **Current id**
END$$
Trigger is not what you need to use for implementing such logic. Simple update statement will do it :
UPDATE questions SET is_pushed = CASE WHEN id =[your_id] THEN 1 ELSE 0 END;