Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Triggers | Forum profile

Forum profile page for Triggers on http://www.mysql.com. This report page is the aggregated overview from a single forum: Triggers, located on the Message Board at http://www.mysql.com. This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period. Additional forum profile information for "Triggers" on the Message Board at http://www.mysql.com is also shown in the following ways:

1) Latest Active Threads
2) Hot Threads for Last Week

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.

Site: MySQL AB - MySQL Forums - Triggers (site profile, domain info mysql.com)
Title: Triggers
Url: http://forums.mysql.com/list.php?99
Users activity: 15 post per thread
Forum activity: 5 active threads during last week
 

Posting activity on Triggers:

  Week Month 3 Months
Threads: 5 40 75
Post: 8 65 110
 

Triggers Posting activity graph:

Posts by:  day  week  month 

Top authors during last week:

Name
Posts
Peter Brawley
2
user's latest post:
Re: Access user-id in a trigger
Published (2009-11-27 13:58:00)
You cannot access anything from PHP in MySQL (unless you ar eprepared to write, compile & link in a custom UDF, not recommended). So your app needs to post the PHP vars to a db table so your trigger can retrieve it. PB http://www.artfulsoftware.com
Marco Eisenring
2
user's latest post:
Re: Access user-id in a trigger
Published (2009-11-27 11:42:00)
Thanks for your fast reply. I was not precise enough. The user-id needed in the trigger is not the MySQL-username, its the id of the currently logged in user in my PHP-app, it refers to the user-fname, user-lname, user-password and is stored in the php-session (plus ofcourse the user-table). I need to access this user-id to save to my history-table "who" updated the record. Any way to access (or work around) the user-id of...
Jake Killoy
1
user's latest post:
cant get varaibles to work
Published (2009-12-02 08:44:00)
OK, this is a ridiculously simple question and im sure you guys will figure this out quick. I can not get user variables to work. for example if i do >Set @test:=1 >Select @test all i get is: [BLOB - 0B] Sorry again for the stupid question. I am just trying to write a trigger and can not get this to work for the life of me. Thanks
Hugh Salmon
1
user's latest post:
Re: Access user-id in a trigger
Published (2009-12-04 11:59:00)
Marco, If you haven't solved your problem yet you could try this. Probably you use a database look-up to authenticate the user's user name and password. At the same time you can grab any information regarding the user and then assign each item to a php variable. You can place these in html forms as hidden inputs and then pass them along in sql insert and update statements.
Rick James
1
user's latest post:
Re: cant get varaibles to work
Published (2009-12-03 23:32:00)
What version of mysql? What I get: mysql> set @test:=1; mysql> select @test; +-------+ | @test | +-------+ | 1 | +-------+
Pavel Leonov
1
user's latest post:
cant get varaibles to work
Published (2009-12-05 09:13:00)
 

Latest active threads on Triggers::

MySQL AB - MySQL Forums
Started 4 days, 16 hours ago (2009-12-03 23:32:00)  by Rick James
What version of mysql? What I get: mysql> set @test:=1; mysql> select @test; +-------+ | @test | +-------+ | 1 | +-------+
Thread:  Show this thread (3 posts)   Thread info: Re: cant get varaibles to work Size: 194 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: cant get varaibles to work :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 1 week, 4 days ago (2009-11-27 10:48:00)  by Peter Brawley
If `36_currency` tracks the MySQL username, the trigger can match it to USER(), otherwise modify that table to track it along with logon timestamps. PB http://www.artfulsoftware.com Edited 2 time(s). Last edit at 11/27/2009 01:56PM by Peter Brawley.
Thread:  Show this thread (5 posts)   Thread info: Re: Access user-id in a trigger Size: 365 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Access user-id in a trigger :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks ago (2009-11-24 11:09:00)  by Peter Brawley
DECLARE must precede all other code in a routine, or in a block within a routine. If a trigger generator is writing this trigger, fix the generator. PB http://www.artfulsoftware.com
Thread:  Show this thread (2 posts)   Thread info: Re: Problem with DECLARES in a trigger Size: 266 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Problem with DECLARES in a trigger :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks ago (2009-11-24 11:06:00)  by Peter Brawley
No triggers on Views in MySQL. Write the trigger on the underlying table. PB http://www.artfulsoftware.com
Thread:  Show this thread (2 posts)   Thread info: Re: Triggers for views Size: 191 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Triggers for views :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks, 1 day ago (2009-11-23 10:48:00)  by Peter Brawley
Dan, I see three problems. 1. No delimiter command, eg ... DROP TRIGGER IF EXISTS tr_fixtimes; DELIMITER go CREATE TRIGGER tr_fixtimes BEFORE INSERT ON ewise_slice FOR EACH ROW BEGIN Declare NewTime TIMESTAMP; Declare GoodTime DATETIME; -- other code here ... END; go DELIMITER ; 2. The query ... SELECT TIMESTAMPDIFF(SECOND,MAX(ewise_slice.slice_timesta mp),MAX(...
Thread:  Show this thread (7 posts)   Thread info: Re: MySQL 5.1 - creating trigger problems Size: 954 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: MySQL 5.1 - creating trigger problems :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks, 2 days ago (2009-11-21 19:01:00)  by Peter Brawley
I think there's an example like that in the manual page on Triggers. PB http://www.artfulsoftware.com
Thread:  Show this thread (4 posts)   Thread info: Re: Help to Create Trigger Size: 186 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Help to Create Trigger :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks, 2 days ago (2009-11-21 17:08:00)  by Jason Mooney
I have resolved the issue I was having. I needed to reference the NEW. for the items I was working with. DELIMITER // CREATE TRIGGER `virtualtcats`.`after_joborder` AFTER UPDATE ON `virtualtcats`.`joborder` FOR EACH ROW BEGIN UPDATE virtualtjoomla.jos_jl_jobposting SET virtualtjoomla.jos_jl_jobposting.title = NEW.title, virtualtjoomla.jos_jl_jobposting.jobtype...
Thread:  Show this thread (2 posts)   Thread info: Re: Assistance w/Trigger between two DBs same instance Size: 1,508 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Assistance w/Trigger between two DBs same instance :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 3 weeks, 3 days ago (2009-11-13 22:28:00)  by Peter Brawley
You forgot DELIMITER? PB http://www.artfulsoftware.com
Thread:  Show this thread (5 posts)   Thread info: Re: TRIGGER BEFORE DELETE ON Size: 139 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: TRIGGER BEFORE DELETE ON :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks, 4 days ago (2009-11-19 23:08:00)  by Peter Brawley
Not doable. By its nature, a Trigger is specific to one table and one table only, so if your trigger doesn't know what table it's servicing, something is wrong. PB http://www.artfulsoftware.com
Thread:  Show this thread (2 posts)   Thread info: Re: Need table name Size: 296 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Need table name :: Triggers :: MySQL AB - MySQL Forums"
MySQL AB - MySQL Forums
Started 2 weeks, 5 days ago (2009-11-19 10:52:00)  by Peter Brawley
Paolo, NEW isn't a general row identifier; it's just a syntactic convenience for referring to particular columns in row being manipulated by a Trigger. Unfortunately PREPARE isn't allowed in triggers & functions. This is one reason MySQL triggers aren't well suited to implementing audit trails. You might want to have a look at the articles titled "Transaction time validity..." in http...
Thread:  Show this thread (3 posts)   Thread info: Re: Selecting from the NEW record in a trigger Size: 781 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Selecting from the NEW record in a trigger :: Triggers :: MySQL AB - MySQL Forums"
 

Hot threads for last week on Triggers::

Triggers
Started 4 days, 16 hours ago (2009-12-03 23:32:00)  by Rick James
What version of mysql? What I get: mysql> set @test:=1; mysql> select @test; +-------+ | @test | +-------+ | 1 | +-------+
Thread:  Show this thread (3 posts)   Thread info: Re: cant get varaibles to work Size: 194 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: cant get varaibles to work :: Triggers :: MySQL AB - MySQL Forums"
Triggers
Started 1 week, 4 days ago (2009-11-27 10:48:00)  by Peter Brawley
If `36_currency` tracks the MySQL username, the trigger can match it to USER(), otherwise modify that table to track it along with logon timestamps. PB http://www.artfulsoftware.com Edited 2 time(s). Last edit at 11/27/2009 01:56PM by Peter Brawley.
Thread:  Show this thread (5 posts)   Thread info: Re: Access user-id in a trigger Size: 365 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Re: Access user-id in a trigger :: Triggers :: MySQL AB - MySQL Forums"

This page was found by:   MySQL trigger cancel insert  mysql trigger cancel  ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'