#1170 Can't see triggers

closed
nobody
MySQL (42)
5
2011-06-12
2011-05-29
No

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

Discussion

  • Marc Delisle

    Marc Delisle - 2011-05-29
    • status: open --> pending
     
  • Rouslan Placella

    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 ;)

     
  • SourceForge Robot

    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).

     
  • SourceForge Robot

    • status: pending --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks