I have a website built with codeigniter
In phpmyadmin i have created this trigger
CREATE TRIGGER `After_Add_Order` AFTER INSERT ON `order`
FOR EACH ROW BEGIN
IF (NEW.points IS NOT NULL) THEN
update users set users.points = users.points + new.points where users.user_id = new.owner_id;
END IF;
END
when i insert data in phpmyadmin the trigger get fired but when i insert data within php the trigger doesn't fire even though the points within inserted order has value.
and this is my php code
if ($this->db->insert('order', $data)) {
$id = $this->db->insert_id();
return $id;
}
Any help