I'm pulling my hair out over this. Anyone have any ideas? Code: DELIMITER $$ CREATE TRIGGER `update_features` AFTER INSERT ON `jos_cbsubs_plans` BEGIN DECLARE itype varchar(16); SET itype := 'usersubscription'; IF NEW.item_type = itype THEN INSERT INTO jos_cbsubs_dya_subscription_features (subs_id,published) VALUES (NEW.id,NEW.published); END IF; END $$ DELIMITER ; MySQL said: Documentation
MySQL Trigger promlem
9
I'm pulling my hair out over this. Anyone have any ideas?
MySQL said: Documentation
#1064 - 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 'BEGIN
DECLARE itype varchar(16);
SET itype := 'usersubscription';
IF NEW.ite' at line 2
Code:
DELIMITER $$ CREATE TRIGGER `update_features` AFTER INSERT ON `jos_cbsubs_plans` BEGIN DECLARE itype varchar(16); SET itype := 'usersubscription'; IF NEW.item_type = itype THEN INSERT INTO jos_cbsubs_dya_subscription_features (subs_id,published) VALUES (NEW.id,NEW.published); END IF; END $$ DELIMITER ;
#1064 - 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 'BEGIN
DECLARE itype varchar(16);
SET itype := 'usersubscription';
IF NEW.ite' at line 2
- Steve Diamond
- [ 2 ] Thanks
- [1] reply
- lisag
- [1] reply
- Kirk Ward
Next Topics on Trending Feed
-
9