2013/05/29 14:51 +0100, Neil Tompkins
This is my Trigger which doesn't seem to work; but doesn't cause a error
DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability;
CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId
varchar(36),UserId bigint(20),ActionType
enum('INSER
OK, the data is going into the temp table. But when I run the
command INSERT INTO AuditTrail SELECT tempHotelRateAvailability.* FROM
tempHotelRateAvailability; from the TRIGGER it does not copy the data.
However if I run this query INSERT INTO AuditTrail SELECT
tempHotelRateAvailability.* FROM
But, does it work inside the trigger. If not, then based on the logic,
there will not be any data, and data goes not get inserted from temp table
to innodb table
On Wed, May 29, 2013 at 7:29 PM, Neil Tompkins wrote:
> I took the following lines of code slightly modified and it returned some
> d
I took the following lines of code slightly modified and it returned some
data using a normal Query Editor
CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId
varchar(36),UserId bigint(20),ActionType varchar(36),TableName
varchar(36),RowKey varchar(255),FieldName varchar(36),OldValue
var
did u check if data is getting inserted into tempHotelRateAvailability
On Wed, May 29, 2013 at 7:21 PM, Neil Tompkins wrote:
> This is my Trigger which doesn't seem to work; but doesn't cause a error
>
> DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability;
>
> CREATE TEMPORARY TABLE te
This is my Trigger which doesn't seem to work; but doesn't cause a error
DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability;
CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId
varchar(36),UserId bigint(20),ActionType
enum('INSERT','UPDATE','DELETE'),TableName varchar(36),RowK
can you please share the code of the trigger. Any kind of error your getting
On Wed, May 29, 2013 at 6:49 PM, Neil Tompkins wrote:
> Hi,
>
> I've a trigger that writes some data to a temporary table; and at the end
> of the trigger writes all the temporary table data in one insert to our
> norm
Hi,
I've a trigger that writes some data to a temporary table; and at the end
of the trigger writes all the temporary table data in one insert to our
normal Innodb table.
However, for some reason the trigger isn't copying the table from the
temporary table to the Innodb table. If I write in the
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 busin
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 wrote:
> If triggers use complex business rules and large transaction.
> What would we be recommendations?
> I need three poss
If triggers use complex business rules and large transaction.
What would we be recommendations?
I need three possible ways.
Thanks,
om 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
> > Su
l?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 -0500, Gael Martinez >>>>
> I'm getting that done today thru a large static trigger script and I
> woul
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 wil
Hello there
I'm trying to figure out an elegant way with Mysql 5.5.25 to log changes
via a before change trigger to a table including the column name of the
field that changed...
How can I dynamically enumerate the field names and populate the field log
into the t1_log test table ... Would a curso
;>>> 20111219 03:42 PM -0800, Jim McNeely >>>>
Not if you are using innoDB tables. For these, you use INSERT and UPDATE
triggers.
Jim McNeely
On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote:
>>>>> 2011/12/19 11:30 -0800, Jim McNeely >>>
>>>> 2011/12/19 13:55 -0800, Jim McNeely >>>>
Anyway, I just thought I would share. BTW I experimented, and innoDB does
updates and fires off update triggers for REPLACE statements, but MyISAM does
delete/inserts.
<<<<<<<<
Thank you. Which versio
Not if you are using innoDB tables. For these, you use INSERT and UPDATE
triggers.
Jim McNeely
On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote:
>>>>> 2011/12/19 11:30 -0800, Jim McNeely >>>>
> In the MySQL documentation, we find this tantalizing statement:
&g
ser-visible effects other than a possible difference in how the
storage engine increments Handler_xxx status variables."
If accurate, the triggers are those of DELETE & INSERT, not UPDATE.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql
likely going to be MySQL with either engine,
but the processes creating these queries have some limitations.
Anyway, I just thought I would share. BTW I experimented, and innoDB does
updates and fires off update triggers for REPLACE statements, but MyISAM does
delete/inserts.
Jim McNeely
On D
Good to know and good that you took time to read the manual, good approach.
But why bother with REPLACE if you will go with INSERT.ON DUPLICATE KEY
UPDATE?
The storage engine is a property of your table and you can set it and/or
change it, it is the low-level layer (physical) of the database
In the MySQL documentation, we find this tantalizing statement:
"It is possible that in the case of a duplicate-key error, a storage engine may
perform the REPLACE as an update rather than a delete plus insert, but the
semantics are the same. There are no user-visible effects other than a possib
Perfect!! This is the answer I was looking for. Thanks! I didn't know about
this.
Jim McNeely
On Dec 18, 2011, at 11:26 AM, Claudio Nanni wrote:
> Only if you can change the application you could use INSERTON DUPLICATE
> KEY UPDATE instead of REPLACE.
>
> Check Peter's post here: http://
Only if you can change the application you could use INSERTON DUPLICATE
KEY UPDATE instead of REPLACE.
Check Peter's post here: http://kae.li/iiigi
Cheers
Claudio
2011/12/17 Jim McNeely
> Here is a fun one!
>
> I have a set of tables that get populated and changed a lot from lots of
> R
2011/12/16 16:00 -0800, Jim McNeely
I have a set of tables that get populated and changed a lot from lots of
REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger
never gets triggered because REPLACES are all deletes and inserts.
The trigger is going to popula
Here is a fun one!
I have a set of tables that get populated and changed a lot from lots of
REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger
never gets triggered because REPLACES are all deletes and inserts.
The trigger is going to populate another table as a queu
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 r
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
>
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 T
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
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 I need to write a function?
Thanks, Chris
*Chris T
have the user_test table to be an exact copy of the
"user" table, would it be safe to say I have to create 3 triggers?
AFTER INSERT
AFTER UPDATE
AFTER DELETE
I figure it would be better to do the "AFTER" incase there was an issue
with doing the operation on the first table
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 r
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 r
*Column Privileges*
Column privileges apply to single columns in a given table. Each privilege
to be granted at the column level must be followed by the column or columns,
enclosed within parentheses.
GRANT SELECT (col1), INSERT (col1,col2) ON mydb.mytbl TO 'someuser'@'somehost';
The allowable
Hi all ,
Im new on mysql,how can block update column of specif table for a user "x"
by trigger in mysql?
Is possible deny acess for columns on mysql?
version: 5.0.77
Regards
On 07/03/2010, at 3:30 AM, Brent Clark wrote:
Hi everyone,
Currently we have a policy that prohibit our customers from
creating stored procedures and triggers on their DB's which I
imagine must be driving them up the walls. It's like having a car
with a boot but you are not a
Hi everyone,
Currently we have a policy that prohibit our customers from creating
stored procedures and triggers on their DB's which I imagine must be
driving them up the walls. It's like having a car with a boot but you
are not able to use it. :)
Are there any reasons why we wou
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
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 updated name in table1 trigger has to made
the same up date for table2. please help me regarding this.
thnaks in
I just would like to know which version of MySQL support the creation of
database triggers with the same action and event for one table.
I'm not sure there is any plan to implement support for multiple triggers
with
the same action and timing.
I certainly hope so... If not, it seem
On Wed, 9 Dec 2009 16:39:33 Jeetendra Ranjan wrote:
> Hi,
>
> I just would like to know which version of MySQL support the creation of
> database triggers with the same action and event for one table.
I'm not sure there is any plan to implement support for multiple triggers with
Hi,
I just would like to know which version of MySQL support the creation of
database triggers with the same action and event for one table.
Because if i create the the triggers as below i am getting error.
First trigger (Succesfull)
++
CREATE TRIGGER CONSUMER_PROFILE_before_delete
>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 Tr
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
Good Day.
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 radacct
FOR EACH ROW
BEGIN
Send the value of @@server_id in the message, and make sure each
server has a unique value for that. Compare the value in the received
message to the value in the server and see whether you should stop the
loop.
On Mon, Feb 2, 2009 at 4:38 AM, Tobias Stocker
wrote:
> Hy there,
>
> I'm planing to
Hy there,
I'm planing to to build a small "partial replication" on MySQL 5.0 using the
Spread Toolkit and the Message API for MySQL. Therefore I'll create a trigger
(on insert) which fetches the row and sends it to the message group XY.
I was wondering if there is a way to tell MySQL in an SQL
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 WHER
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 WHER
This means you should take care of the routine replication of this section.
On Jan 13, 2008 6:04 PM, gengxy-douban <[EMAIL PROTECTED]> wrote:
> With MySQL's classic statement-based replication, there may be issues with
> replicating stored routines or triggers
>
> from : h
With MySQL's classic statement-based replication, there may be issues with
replicating stored routines or triggers
from : http://dev.mysql.com/doc/refman/5.1/en/replication-formats.html
what's mean?
Hello,
I am facing a problem related with triggers and bulk updates/inserts.
I have two tables one is having 'transactions' and another is 'documents'.
Each record in transactions table relates with a document by DocId. Foreign
keys are created.
I have activated triggers for tr
>Description:
I am using MySQL server as backend database supporting a telecomm platform
providing voice over ip services.
tables involved: acc, cdr, account, location2
Partial processing flow:
1. When a phone call is started. A record will be inserted into table acc
(method=INVITE). This will
re
there could be row level locking/conflicts...
Is this more or less how mysql innodb/triggers/locking works?
thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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. For
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. For example in php i would just use
while($row = $result->fetch_assoc)
{
..process the row
}
I have no
It would be advisable that your triggers be dumeds in association with your
table structures like this
mysqldump -h... -u... -p... --no-data --triggers
However, the next line is what you are looking for
mysqldump -h... -u... -p... --no-data --no-create-info --triggers
- Original Message
I need to create dump of all triggers in my database (This means that ONLY
triggers must be dumped and nothing more: no data and no table structure). Is
there any direct (or simple) way to do that? Mysqldump seems to be unable to
do that.
The only two ways i see -- to create a script that gets
Cory Robin wrote:
We have a statement that joins 8 different tables to pull
multiple rows from each table.
I have heard of people using triggers to create, update and
delete records in a table based on statements in other
tables.
The obvious result of this would be to SPEED up results
We have a statement that joins 8 different tables to pull
multiple rows from each table.
I have heard of people using triggers to create, update and
delete records in a table based on statements in other
tables.
The obvious result of this would be to SPEED up results
right? :)
I'd lo
Question.
I have two tables donation_test, and max_donation. The
max donation table is a summary table, used to keep
the max donation for each contact_id, by listing its
donation_id. We have decided to use database level
triggers to keep the summary table (max_donation)
table up to date. I have
Well I´m having some problems with a trigger and i don´t know how to handle
this situation.
Let´s start... well I have 2 tables (Table1 and Table2). Only fictional
tables.
CREATE TABLE `table1` (
`id` int(10) unsigned NOT NULL auto_increment,
`status` tinyint(1) unsigned NOT NULL,
PRIMARY KEY
On Wednesday 09 August 2006 07:27 am, Vittorio Zuccalà wrote:
> Hello,
> i'm searching for a manual about stored procedures and triggers.
> I'm new about this arguments but i want to study them.
> Unfortunally, mysql online manual is not rich about examples so, can you
>
Hello,
i'm searching for a manual about stored procedures and triggers.
I'm new about this arguments but i want to study them.
Unfortunally, mysql online manual is not rich about examples so, can you
suggest me
some online manuals on stored procedures and triggers?
Thank you,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all,
I've a problem with triggers and federated table:
I would like insert a record in a unknown table. The table where insert
the record is unknown when the trigger starts. But, with a field value,
I select the table name.
CREATE TR
it
possible to call UDFs from within Triggers...
Hope to hear at the earliest...
Thanks in advance.
Palani.
On 6/1/06, Patrik Wallstrom <[EMAIL PROTECTED]> wrote:
Easy setup: two mysql 5 servers, one running master, the other one is
slave. The database have triggers to create history of rows in history
tables.
What is expected from the slave? Is it expected to run the triggers,
as well as rec
Easy setup: two mysql 5 servers, one running master, the other one is
slave. The database have triggers to create history of rows in history
tables.
What is expected from the slave? Is it expected to run the triggers,
as well as receiving the new row in the history table? Or should it
really run
Hi, I'm having problems with a trigger that I'm working on, I want to create
a trigger that after inserting a row in table A will copy the row to table B
and once there will delete the row from table A.
I'm using two triggers for this one goes on table A and does the copy of the
Daevid,
>> > > This is my first trigger I'm trying to write.
>> > > I have two tables. 'stores' and 'zipcodes'.
>> > > I want to automatically set the latitude and
longitude of the store using
>> > > it's zipcode lookup in the zipcode table.
>> > > DELIMITER $$;
>> > > DROP TRIGGER `store_coo
t [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 16 May 2006 2:41 p.m.
To: 'Martijn Tonies'; mysql@lists.mysql.com
Subject: RE: Need help with triggers
> > This is my first trigger I'm trying to write.
> >
> > I have two tables. 'stores' and 'zipcodes
> > This is my first trigger I'm trying to write.
> >
> > I have two tables. 'stores' and 'zipcodes'.
> >
> > I want to automatically set the latitude and longitude of
> the store using
> > it's zipcode lookup in the zipcode table.
> >
> > DELIMITER $$;
> >
> > DROP TRIGGER `store_coord`$$
> >
> >
Daevid,
> This is my first trigger I'm trying to write.
>
> I have two tables. 'stores' and 'zipcodes'.
>
> I want to automatically set the latitude and longitude of the store using
> it's zipcode lookup in the zipcode table.
>
> DELIMITER $$;
>
> DROP TRIGGER `store_coord`$$
>
> create trigger `s
This is my first trigger I'm trying to write.
I have two tables. 'stores' and 'zipcodes'.
I want to automatically set the latitude and longitude of the store using
it's zipcode lookup in the zipcode table.
DELIMITER $$;
DROP TRIGGER `store_coord`$$
create trigger `store_coord` BEFORE INSERT o
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
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 wa
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 quali
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 ne
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 the CREATE TRIGGER statement to CURRENT_USER (i.e.,
[EMAIL PROTECTED]), but the error still occurs. If I try setting the
DEFI
number of CUIDS for that date and time if it does.
I have never done anything with triggers and wonder if this is possible?
John Brittingham
Marketing and Customer Systems
Desk: 425-288-8071
Cell: 425-770-0458
Privet!
This seems as a bug, especially because with InnoDB tables bulk
insert works fine. You may add your comments at:
http://bugs.mysql.com/bug.php?id=16021
Juri Shimon wrote:
> Hello mysql,
>
> When trigger on table uses select from same table, then bulk insert into
> t
Hello mysql,
When trigger on table uses select from same table, then bulk insert into
this table cause error.
How to repeat:
create table t(i int not null, j int not null, n numeric(15,2), primary
key(i,j));
create table s(i int not null, n numeric(15,2), primary key(i));
delimiter //
crea
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 diag
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.
>
>
>
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.
Simply I am trying to insert a list of tasks into the DB for various
computers to run, I want to track when they ran and where they ran. I
also have to limit some of
Hello.
>4. triggers reference another table
They're allowed as of MySQL 5.0.10. See:
http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html
Jenny Chen wrote:
>Does the current latest MySQL 5.0 support:
>1. column based triggers
>2. trigger restriction
>
Hi,
Does the current latest MySQL 5.0 support:
1. column based triggers
2. trigger restriction
3. multiple triggers of same type of the table
4. triggers reference another table
And any information on in which release they will be supported?
Thanks,
Jenny
A valid question. However that's only the simplest example of the kind of
validation I'm trying to put into the triggers (for the sake of a shorter
email).
Dan.
-Original Message-
From: Björn Persson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 09, 2005 5:25 PM
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:http://lists.my
I see what you're saying. That won't really help, because I'll still be
duplicating changes in the update and insert triggers every time I add a
new field. The hope was that I would only need to do it once. Your
method sounds like it could become costly from an execution time
"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 m
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 an UPDATE trigger, which makes it harder to maintain in th
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
"Rec
You could re-write your query so that you get the lat and lon for each
location as you run the query. Since each location has a zip code, this
just means only one extra join per query. That also means you won't need
the triggers as you are looking up each locations lat and lon on the fly.
This does not work as I am drawing the information from 2 tables. I did use
the NEW operator and every combination I could think of. Below I'll include
the triggers and so on. What the deal is that I have a query to find
locations within a certain radius. BUT from what I read in the table
This does not work as I am drawing the information from 2 tables. I did use
the NEW operator and every combination I could think of. Below I'll include
the triggers and so on. What the deal is that I have a query to find
locations within a certain radius. BUT from what I read in the table
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 around
MySQL.
I expect that your problems will go away if the table that triggers the
action is always different from the table that is changed as a result of the
trigger. In other words, if an action in Table X is your trigger, the
action taken when the trigger is pulled should take place in some table
I am trying to use triggers for the first time with MySQL 5.0. I have read
the manual but I am not understanding why I would run into the following
problem.
I created the following triggers:
CREATE TRIGGER UpdPopCoord AFTER UPDATE ON locations FOR EACH ROW
UPDATE locations, zipcodes
SET
1 - 100 of 185 matches
Mail list logo