I'm trying to assign a value from a field of a select statement to a local variable in my trigger. Does it have any way to do that? Any help would be very appreciated My trigger
DELIMITER $$
CREATE TRIGGER update_cart_total
before insert
ON core_cartdetails FOR EACH ROW
BEGIN
declare total DOUBLE;
select Total into total from core_cart where CartID = NEW.CartID;
END $$
DELIMITER ;