Well, once they are avialable, triggers and/or stored procedures may be your answer, 
however, most trigger design (don't know about MySQL's forthcoming implementation) 
won't let you modify the same table on an update or insert, as you could end up in an 
infinite loop very easily. 

For now, I think that you're stuck doing it in your application.  Just encapsulate how 
that data can be updated, and have all code that updates it call your 
function/method/etc...

My $0.02...

Dan Greene

> -----Original Message-----
> From: Mumba Chucks [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 23, 2003 9:53 AM
> To: Rob
> Cc: [EMAIL PROTECTED]
> Subject: RE: Changing multiple records dynamically
> 
> 
> Hi Rob,
> 
> Definitely trying to do a value swap.
> 
> Regards,
> David
> 
>  --- Rob <[EMAIL PROTECTED]> wrote: > Are you
> trying to do a value swap or are you just
> > updating?  If you are
> > updating you could simply do
> > 
> > UPDATE table
> > SET DEFG = 11,
> > HIKJ = 12
> > 
> > -----Original Message-----
> > From: Mumba Chucks [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, October 23, 2003 3:11 PM
> > To: [EMAIL PROTECTED]
> > Subject: Changing multiple records dynamically
> > 
> > 
> > Hi,
> > 
> > Is there any way to automatically update several
> > rows
> > as a result of a change to information being changed
> > in another row in the same table?
> > 
> > |------|-------|
> > | NAME | VALUE |
> > |------|-------|
> > | ABCD | 10    |
> > | DEFG | 12    |
> > | HIJK | 11    |
> > |------|-------|
> > 
> > So if I changed DEFG to 11, how would I swap the
> > value
> > with that of HIJK or swap ABCD with DEFG?
> > 
> > Thanks,
> > Mumba
> > 
> >
> ______________________________________________________________
> __________
> > Want to chat instantly with your online friends? 
> > Get the FREE Yahoo!
> > Messenger http://mail.messenger.yahoo.co.uk
> > 
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> >
> http://lists.mysql.com/[EMAIL PROTECTED]
> > 
> >  
> 
> ______________________________________________________________
> __________
> Want to chat instantly with your online friends?  Get the FREE Yahoo!
> Messenger http://mail.messenger.yahoo.co.uk
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to