cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: mod-db - Updating multiple rows
Date Sun, 08 Jun 2003 15:33:03 GMT
Amelie Cordier wrote:
> I have some troubles while updating multiple rows in my DB with modular
> database actions. Insertion of multiple rows with set="master" and
> set="slave" stuff works well but I don't know what to do with the update
> action.

They all work the same since they share the same code for this. The 
"set" columns are variable while the others are fixed. It does not 
matter which "set" column is the "master" -- the only difference is that 
the "master" is used to determine the number of rows to update.

One thing is impossible, though: update may not affect key columns. This 
has been requested by Antonio but he didn't come up with a patch so far ;-)

> Here is the situation :
> In my table, there is four keys element. Only one of them (named
> "student") vary in my case.

So have only student be part of the set. Setting it to "master" would be 
a good choice.

> There is also two value which vary with the key element.

Those need to be in the set as well. Set these to "client".

> As the key elements are already in the database, I juste want to update
> the two other values for each "student".

Right, the action does not allow to update any key columns, so you are fine.


C h r i s t i a n       H a u l
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message