Re: Triggers

2013-05-10 Thread Michael Dykman
Your question is far too vague to answer. What are your requirements? What considerations are you worried about? On Fri, May 10, 2013 at 2:55 PM, Aastha aast...@gmail.com wrote: If triggers use complex business rules and large transaction. What would we be recommendations? I need three

RE: Triggers

2013-05-10 Thread Rick James
Triggers use whatever code you put in them. Recommendations for what? -Original Message- From: Aastha [mailto:aast...@gmail.com] Sent: Friday, May 10, 2013 11:55 AM To: mysql@lists.mysql.com Subject: Triggers If triggers use complex business rules and large transaction. What

RE: Triggers and column names

2012-06-22 Thread Rick James
] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table

Re: Triggers and column names

2012-06-22 Thread Gael Martinez
to change from one invocation of the trigger to the next, so don't have the dynamic code inside the trigger. -Original Message- From: Hal?sz S?ndor [mailto:h...@tbbs.net] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06

Re: Triggers and column names

2012-06-21 Thread Hal�sz S�ndor
2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table in INFORMATION_SCHEMA.COLUMNS, and, yes, you can look up the field names--but then what will you do with

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Luis Motta Campos
On 8 Sep 2011, at 16:23, Chris Tate-Davies wrote: Hello. I want to know if there is a special way I can access all the data in the NEW/OLD data? I realise I can access it by referencing NEW.fieldname but I want to serialise the NEW object so I can save as a string. Is this possible or do

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Chris Tate-Davies
Thanks, I kinda guessed that, but I'm not sure how to pass the OLD object to it as MySQL cannot handle a rowset datatype. Has anyone had any experience with this? Not sure where to start or how to proceed. Chris On 13/09/11 07:40, Luis Motta Campos wrote: On 8 Sep 2011, at 16:23, Chris

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Claudio Nanni
Hi, Just quick reading your email, forgive me if I'm mistaken what about serializing using *concat(old.f1,'|||',old.f2,'|||',old.f3) ('|||' = any separator that works for you)* and deserialize inside the function? does this make any sense to you? Cheers Claudio 2011/9/13 Chris Tate-Davies

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Chris Tate-Davies
I could do that, but I was hoping I wouldn't have to specify the individual fields, and just pass the collection for parsing. If I were to add any fields I would have to re-write the trigger which is something I was trying to avoid. On 13/09/11 09:53, Claudio Nanni wrote: Hi, Just quick

Re: Triggers and FOR EACH ROW

2010-07-13 Thread Martijn Tonies
Manao ahoana, Hello, Bonjour, I just read several documentation on MySQL triggers. The way to create triggers is: CREATE TRIGGER t21_au BEFORE UPDATE ON t22 FOR EACH ROW BEGIN // ... END; The trigger I want is only on UPDATE. Is FOR EACH ROW referring to each existing row in the table, or to

Re: triggers- how to bring updates in one table to another table

2010-01-28 Thread Alexander Kolesen
CREATE TRIGGER sync_t AFTER UPDATE ON table1 FOR EACH ROW UPDATE table2 SET name = NEW.name WHERE id = NEW.id; i have two tables namely.. table1 and table2, table1 and table2 have the two columns samely like id and name, by using triggers i have to bring the updates in table1 to table2, if i

RE: Triggers For Radius DB

2009-07-08 Thread Marcel Grandemange
In the last episode (Jul 07), Marcel Grandemange said: I hope someone can assist me. I have a freeradius server running off mysql. Now I would like to use triggers to negate some of the traffic logged within it. I tried to use following as trigger.. Create Trigger ftp BEFORE UPDATE ON

Re: Triggers For Radius DB

2009-07-07 Thread Dan Nelson
In the last episode (Jul 07), Marcel Grandemange said: I hope someone can assist me. I have a freeradius server running off mysql. Now I would like to use triggers to negate some of the traffic logged within it. I tried to use following as trigger.. Create Trigger ftp BEFORE UPDATE ON

Re: triggers sintax error with IF

2008-02-16 Thread Paul DuBois
Hi, im struggling with triggers but i can make this works because of bad sintax, i hope someone can give me a hand CREATE TRIGGER trigger_actualize AFTER INSERT ON usuarios_imgvid FOR EACH ROW IF NEW.type=IMG THEN UPDATE users_status E SET images=images+1 WHERE E.id_usr =

Re: triggers

2007-04-11 Thread Andrew Dashin
Hi, ch Probably you should look here http://dev.mysql.com/doc/refman/5.0/en/cursors.html -- Andrew Dashin ch h пишет: In a trigger I need to iterate thru a query result that will consist of more than 1 row. Could someone please give me a general example of how this would be accomplished.

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-09 Thread Gleb Paharenko
Hello. This should be interesting for you: http://bugs.mysql.com/bug.php?id=16266 Ian Sales (DBA) wrote: - unfortunately, the set up demands that the master stays at 4.0. I can't change that. The triggers were working in 5.0.16. It's the new DEFINER that was added with 5.0.17

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-09 Thread Ian Sales (DBA)
Gleb Paharenko wrote: Hello. This should be interesting for you: http://bugs.mysql.com/bug.php?id=16266 Hi, The bug report implies that if you recreate the triggers on the slave (deleting them manually from the database directory), then it resolves the issue. Unfortunately, the

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-06 Thread Ian Sales (DBA)
Gleb Paharenko wrote: Hello. I've subsequently upgraded the instance to 5.0.18, Have you updated master to 5.0.18 as well? - unfortunately, the set up demands that the master stays at 4.0. I can't change that. The triggers were working in 5.0.16. It's the new DEFINER that

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-06 Thread Gleb Paharenko
Hello. I've subsequently upgraded the instance to 5.0.18, Have you updated master to 5.0.18 as well? Ian Sales (DBA) wrote: After upgrading to 5.0.17, the triggers on one of my instances now break replication with a definer is not fully qualified error. I set the DEFINER in

Re: triggers? when they execute and locking

2005-12-05 Thread Gleb Paharenko
Hello. Please could you provide a repeatable test case, so it will be easier for list members to diagnose this weird behavior? Ben De Luca wrote: Im am trying to implement a task running system with mysql and Im coming across a few problems with what I am trying to do.

Re: triggers? when they execute and locking

2005-12-05 Thread Ben De Luca
Ill try? and make some thing more simple thats what I have actually running, Can some one clarify that what I am doing should work though? On 05/12/2005, at 9:54 PM, Gleb Paharenko wrote: Hello. Please could you provide a repeatable test case, so it will be easier for list members to

RE: Triggers that handle multiple events (insert and update)

2005-11-10 Thread Burke, Dan
@lists.mysql.com Subject: RE: Triggers that handle multiple events (insert and update) onsdagen den 9 november 2005 18:07 skrev Burke, Dan: For example, one field has to be = 0, so I put this validation Why don't you just declare that field as unsigned? Björn Persson -- MySQL General Mailing List

Re: Triggers that handle multiple events (insert and update)

2005-11-09 Thread SGreen
Burke, Dan [EMAIL PROTECTED] wrote on 11/09/2005 09:05:50 AM: Hello, Can triggers in 5.0 handle multiple events? I have some range checking I'd like to enforce at the database level when inserting or updating a record, and I'm finding myself duplicating trigger code to make an INSERT and

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Burke, Dan
, November 09, 2005 9:59 AM To: Burke, Dan Cc: mysql@lists.mysql.com Subject: Re: Triggers that handle multiple events (insert and update) Burke, Dan [EMAIL PROTECTED] wrote on 11/09/2005 09:05:50 AM: Hello, Can triggers in 5.0 handle multiple events? I have some range checking I'd like

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Björn Persson
onsdagen den 9 november 2005 18:07 skrev Burke, Dan: For example, one field has to be = 0, so I put this validation Why don't you just declare that field as unsigned? Björn Persson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Triggers

2005-10-10 Thread Ian Sales (DBA)
Steffan A. Cline wrote: Upon insert or update I get the following error: ERROR 1442 (HY000): Can't update table 'locations' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. What exactly is the meaning of this? Is there no way

Re: Triggers

2005-10-10 Thread Steffan A. Cline
+0100 To: Steffan A. Cline [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: Triggers Steffan A. Cline wrote: Upon insert or update I get the following error: ERROR 1442 (HY000): Can't update table 'locations' in stored function/trigger because it is already used by statement which

Re: Triggers

2005-10-10 Thread Steffan A. Cline
--- From: Ian Sales (DBA) [EMAIL PROTECTED] Date: Mon, 10 Oct 2005 08:51:55 +0100 To: Steffan A. Cline [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: Triggers Steffan A. Cline wrote: Upon insert or update I get the following error: ERROR 1442 (HY000): Can't update table 'locations

Re: Triggers

2005-10-10 Thread SGreen
Alliance Member --- From: Ian Sales (DBA) [EMAIL PROTECTED] Date: Mon, 10 Oct 2005 08:51:55 +0100 To: Steffan A. Cline [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: Triggers Steffan A. Cline wrote: Upon

Re: Triggers

2005-10-10 Thread Gleb Paharenko
Hello. I just skimmed the article on CREATE TRIGGER in the manual and don't see any prohibition against making the triggered action take place in the same table I hope this is a temporary limitation. From: http://dev.mysql.com/doc/mysql/en/news-5-0-12.html Recursive triggers are

Re: Triggers

2005-10-09 Thread Rhino
I have never written a trigger in MySQL but I've done a number of them in DB2 so, assuming the same principles apply to both: I think the problem is that you are attempting to make the triggered action - the UPDATE or INSERT - occur in the same table (or a join involving the same table) as the

Re: Triggers

2005-06-17 Thread Ruben Oliveira
yes there is : http://www.postgresql.org/docs/7.4/interactive/sql-createtrigger.html FOR EACH ROW FOR EACH STATEMENT This specifies whether the trigger procedure should be fired once for every row affected by the trigger event, or just once per SQL statement. If neither is specified,

Re: Triggers

2005-06-17 Thread SGreen
If that works for MySQL, the official documentation doesn't show it: http://dev.mysql.com/doc/mysql/en/create-trigger.html I don't have a copy of the 5.0+ source or I could check the sql/sql_yacc.yy file to see if the syntax is supported. Anyone else able to help out here? Shawn Green

Re: Triggers

2005-06-17 Thread Gleb Paharenko
Hello. SQL 99 allows action Granularity FOR EACH STATEMENT, and it is default. But FOR EACH ROW is more common and it seems MySQL supports only second. When Granualarity FOR EACH STATEMENT trigger action occurs only once, when FOR EACH ROW - once for each row (3 times in your case).

Re: triggers or stored procedures

2004-06-28 Thread Martijn Tonies
Hi Carlos, What is more important? triggers or stored procedures. I think that triggers they are a lot more important than stored proc. because stored procs they can be implemented in the front end application. Then they wouldn't be Stored Procedures anymore would they :-) In the version 5

Re: triggers or stored procedures

2004-06-28 Thread Josh Trutwin
On Mon, 28 Jun 2004 07:11:04 -0300 Carlos J Souza [EMAIL PROTECTED] wrote: hello all What is more important? triggers or stored procedures. I think that triggers they are a lot more important than stored proc. because stored procs they can be implemented in the front end application.

RE: triggers or stored procedures

2004-06-28 Thread Gilbert Wu
leather seats and cruise control... It may make an interesting hobby to build your own car but I hate reinventing the wheel. Gilbert -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: 28 June 2004 11:39 To: mysql Subject: Re: triggers or stored procedures Hi Carlos

Re: triggers or stored procedures

2004-06-28 Thread SGreen
Carlos, I think you have a misunderstanding about what a trigger is or does. A trigger is, in its most basic form, an automatically executed stored procedure. The ability to detect an event is pointless withouth the ability to do something once that event occurs. We have to have the one

Re: triggers (or too-many-crappy-questions)

2004-05-01 Thread Robert A. Rosenberg
At 12:22 -0700 on 04/30/2004, Eric wrote about Re: triggers (or too-many-crappy-questions): Hi, Can we have list for people who just like to give newbies shit? How about [EMAIL PROTECTED] How much have you guys paid for your support hmm? This is a free mailing list and I don't really see why

Re: triggers (or too-many-crappy-questions)

2004-05-01 Thread Joshua J. Kugler
I found that the Postgres mailing list was full of very polite, super helpful people. I found that the MySQL list was full of relatively cranky people with little patience. Over that last year, I've I think I've discovered why. The average quality of the questions posted on the MySQL list

Re: triggers

2004-04-30 Thread Josh Trutwin
On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. http://dev.mysql.com/doc/mysql/en/ANSI_diff_Triggers.html -- MySQL General Mailing List For list

Re: triggers

2004-04-30 Thread Paul DuBois
At 17:04 +0100 4/30/04, joe collins wrote: Hi Are there any plans to have triggers introduced into MySQL? http://dev.mysql.com/doc/mysql/en/Roadmap.html -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives:

Re: triggers

2004-04-30 Thread Paul DuBois
At 10:17 -0500 4/30/04, Josh Trutwin wrote: On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. That's true, but if history is any guide, the very next posting

Re: triggers

2004-04-30 Thread Jochem van Dieten
Paul DuBois wrote: At 10:17 -0500 4/30/04, Josh Trutwin wrote: On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. That's true, but if history is any guide, the

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread David Griffiths
That's true, but if history is any guide, the very next posting on this subject will contain the question: So, when will 5.1 be available as a production release? When we were evaluating databases, I looked both at Postgres, SAPDB, and MySQL. I've been subscribed to the MySQL and Postgres

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread Chris W
David Griffiths wrote: Maybe a new MySQL list is needed - one called Dumb Questions, and when someone posts one to any other list, someone can quickly respond, Please repost this on the MySQL Dumb Questions list, as that's where it belongs. The footer for the Dumb Questions list should be, This

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread Eric
Hi, Can we have list for people who just like to give newbies shit? How about [EMAIL PROTECTED] How much have you guys paid for your support hmm? This is a free mailing list and I don't really see why people have to moan about a few simple questions every once in a while. The people who moan

RE: Triggers

2003-06-18 Thread Jay Blanchard
[snip] The argument usually used by people looking for - triggers - functions + procedures - foriegn keys is the persuit of data integrity, and encapsulating business logic within the database. Whilst this goal is noble, it can be fully achieved within the application code, and not in the

RE: Triggers

2003-06-18 Thread Kerry Colligan
Thanks to all. Simon's response outlines the direction I will be headed. KC [snip] The argument usually used by people looking for - triggers - functions + procedures - foriegn keys is the persuit of data integrity, and encapsulating business logic within the database. Whilst this goal is

RE: Triggers

2003-06-18 Thread Steven Roussey
Just a couple of quick notes: 1. While I use PHP CLI for a lot of things (can we say cron?), it is not a sufficient replacement for triggers. What happens when someone is using the Mysql command prompt to alter data? Or using a non-PHP application? 2. While I agree that having application code

Re: Triggers

2003-06-17 Thread Primaria Falticeni
Why don't you use PHP or ASP functions on the server-side in Web page code. They act like a trigger and you don't need MySQL 5.0 for them. Remember that you can benefit from the both servers: MySQL and Web server. - Original Message - From: Kerry Colligan [EMAIL PROTECTED] To: Sent:

RE: Triggers

2003-06-17 Thread Kerry Colligan
:28 PM To: Kerry Colligan Cc: MySQL LIST Subject: Re: Triggers Importance: High Why don't you use PHP or ASP functions on the server-side in Web page code. They act like a trigger and you don't need MySQL 5.0 for them. Remember that you can benefit from the both servers: MySQL and Web server

Re: Triggers

2003-06-17 Thread Becoming Digital
: MySQL LIST [EMAIL PROTECTED] Sent: Tuesday, 17 June, 2003 14:28 Subject: Re: Triggers Why don't you use PHP or ASP functions on the server-side in Web page code. They act like a trigger and you don't need MySQL 5.0 for them. Remember that you can benefit from the both servers: MySQL and Web server

RE: Triggers

2003-06-17 Thread Jay Blanchard
[snip] I think I mentioned this. The problem is, I need reproducible results from both web interface AND command line. If I implement the triggers in PHP, I only get the results from the web. [/snip] Bt! Nope, you can use PHP CLI (command line interface) where PHP scripts can be run from

Re: Triggers

2003-06-17 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-17 21:28:12 +0300: From: Kerry Colligan [EMAIL PROTECTED] I see that 5.x will support triggers. Does anyone have any advice for implementation of triggers on the DB? I will need to be able to utilize them from web applications AND from command-line type

Re: Triggers

2003-06-17 Thread Primaria Falticeni
Use PERL to make a script which acts like a trigger. It can be launched from the command line. Iulian - Original Message - From: Kerry Colligan [EMAIL PROTECTED] To: MySQL LIST [EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 9:46 PM Subject: RE: Triggers I think I mentioned

RE: Triggers

2003-06-17 Thread Kerry Colligan
Neuhauser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 3:05 PM To: Primaria Falticeni Cc: Kerry Colligan; MySQL LIST Subject: Re: Triggers # [EMAIL PROTECTED] / 2003-06-17 21:28:12 +0300: From: Kerry Colligan [EMAIL PROTECTED] I see that 5.x will support triggers. Does anyone have any

RE: Triggers

2003-06-17 Thread Jay Blanchard
[snip] There are a few MySQL trigger-emulation classes in the PHP Classes Repository, too, taking away some of the development work. Unfortunately, these won't work from the command line, so perhaps that's why the original poster hasn't taken this route. [/snip] Why will they not work from the

Re: Triggers

2003-06-17 Thread Primaria Falticeni
: Re: Triggers # [EMAIL PROTECTED] / 2003-06-17 21:28:12 +0300: From: Kerry Colligan [EMAIL PROTECTED] I see that 5.x will support triggers. Does anyone have any advice for implementation of triggers on the DB? I will need to be able to utilize them from web applications AND from

RE: Triggers

2003-06-17 Thread Madscientist
At 02:46 PM 6/17/2003 -0400, Kerry Colligan wrote: I think I mentioned this. The problem is, I need reproducible results from both web interface AND command line. If I implement the triggers in PHP, I only get the results from the web. I would recommend that you build application objects in java

Re: Triggers

2003-06-17 Thread Becoming Digital
www.becomingdigital.com - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Becoming Digital [EMAIL PROTECTED]; MySQL LIST [EMAIL PROTECTED] Sent: Tuesday, 17 June, 2003 15:22 Subject: RE: Triggers [snip] There are a few MySQL trigger-emulation classes in the PHP Classes Repository

Re: Triggers

2003-06-17 Thread Jeff Mathis
the main reason I might suggest NOT to do this is a data integrity one. As long as someone can go in through a mysql prompt and touch data, PHP or ASP will do you no good. Data integrity checks should, in so far as possible, always be put into the schema, and not in an API. just my two cents

Re: Triggers

2003-06-17 Thread Simon Windsor
Hi Interesting ... The argument usually used by people looking for - triggers - functions + procedures - foriegn keys is the persuit of data integrity, and encapsulating business logic within the database. Whilst this goal is noble, it can be fully achieved within the application code, and

Re: Triggers

2002-07-31 Thread Egor Egorov
Guilherme, Tuesday, July 30, 2002, 10:12:57 PM, you wrote: G Is there any option to substitute Triggers or Stored Procedures on MySQL? Nope. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___

Re: triggers and stored procudures

2002-05-27 Thread Victoria Reznichenko
Ki, Monday, May 27, 2002, 6:41:02 PM, you wrote: KM I would like to find out if anyone here has any experience writing stored prods and triggers in mySQL. KM Hopefully someone can tell me which version of mySQL is more stable if I want to write stored prods and triggers. Stored procedures

RE: Triggers

2002-04-24 Thread Simon Green
I think this is some thing that should be in on V4.1... Have a look at things to do on the site Simon -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: 24 April 2002 08:28 To: [EMAIL PROTECTED] Subject: Triggers Hello All, Is Mysql supports sql

RE: Triggers

2002-04-24 Thread Cameron Webster
Uma I asked MySQL the same question earlier this week and got the following answer : Cameron, Actually Stored procedures and triggers will be in version 5.0, which is planned for release by end of year. Current development is underway. A stable version of 5.0 will likely be in Q1 of 2003, but

RE: triggers, stored procedures, and views

2002-01-30 Thread Land, Christopher
Sounds like we just need a table to keep track of LAST_INSERT_ID per table. C:heers -Original Message- From: jds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 7:05 AM To: [EMAIL PROTECTED] Cc: David T. Anderson Subject: triggers, stored procedures, and views I am

Re: triggers and references.

2002-01-10 Thread Gerald Clark
The many simple questions you ask imply that you have not read the manual. Triggers are not supported. Matthew Darcy wrote: Hi, in Oracle I have a test database. there are 2 tables table1 and table2. there is a field on both tables called account_number. on table 1 it is set to auto

RE: triggers and references.

2002-01-10 Thread Matthew Darcy
[mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 15:30 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: triggers and references. The many simple questions you ask imply that you have not read the manual. Triggers are not supported. Matthew Darcy wrote: Hi, in Oracle I have a test database

Re: triggers

2001-05-16 Thread Peter Pentchev
On Wed, May 16, 2001 at 04:13:50PM +0530, [EMAIL PROTECTED] wrote: We are planning to migrate from Oracle to mysql. Before we do it, i need clarification on: 1. Does mysql supports triggers ? 2. if a client has to excess mysql then is a copy of mysql needed to be installed on the clients