Support Requests item #3308948, was opened at 2011-05-29 09:57
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377409&aid=3308948&group_id=23067
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MySQL
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Andrew Norman (donoss)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't see triggers
Initial Comment:
Hi,
I'm new to MySQL and phpMyAdmin so please be gentle with me!
I'm trying to create a r=trigger on a table as below which runs fine and phpMyAdmin say's it was successful, however when I run a show triggers no triggers are returned, can anyone help as I must be missing something?
delimiter //
CREATE TRIGGER jos_jd_donors_ai AFTER INSERT ON jos_jd_donors FOR EACH ROW
BEGIN
declare row_count integer default 0;
select count(*) into row_count
from jos_jd_donors
where campaign_id = new.campaign_id;
if row_count > 2 then
update jos_jd_campaigns
set published = 0
where campaign_id = new.campaign_id;
end if;
END
delimiter ;
Many thanks
Andy
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2011-06-12 12:20
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Rouslan Placella (roccivic)
Date: 2011-05-29 12:38
Message:
what version of mysql?
Anyway, remove both DELIMITER statements, you don't need them. Put the
query alone in the SQL box, without any delimiters other than the semicolon
anywhere and then set a special delimiter (// for example) in the textbox
under the SQL box (on the left) and run the query. Should work fine then.
Once you create a trigger, it will also show up in the structure tab of
the table, at the bottom of the page ;)
----------------------------------------------------------------------
Comment By: Marc Delisle (lem9)
Date: 2011-05-29 11:22
Message:
Which exact command are you using to show the triggers? Syntax is explained
at http://dev.mysql.com/doc/refman/5.1/en/show-triggers.html
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377409&aid=3308948&group_id=23067
|