Re: Updating multiple rows with Django DB API?

2007-07-20 Thread Jeff
cursor.commit() On Jul 15, 9:12 pm, "Steven Hilton" <[EMAIL PROTECTED]> wrote: > On 7/15/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > > > On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > > > I could be updating any number of rows in bar. I want to do this > > > without do a select on

Re: Updating multiple rows with Django DB API?

2007-07-15 Thread Steven Hilton
On 7/15/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > > I could be updating any number of rows in bar. I want to do this > > without do a select on bar. > > Also, it's worth noting that this is also fairly easy to do, it just > involves a

Re: Updating multiple rows with Django DB API?

2007-07-15 Thread James Bennett
On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > I could be updating any number of rows in bar. I want to do this > without do a select on bar. Also, it's worth noting that this is also fairly easy to do, it just involves a little bit more code. Something like the following example should

Re: Updating multiple rows with Django DB API?

2007-07-15 Thread James Bennett
On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > When foo.level drops to zero, I need to flip bar.switch like so... > > update bar set switch = 0 where foo_id = foo.id and switch = 1 > > I could be updating any number of rows in bar. I want to do this > without do a select on bar. > > Do I

Re: Updating multiple rows with Django DB API?

2007-07-15 Thread Collin Grady
No, you must use custom SQL. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to

Re: Updating multiple rows with Django DB API?

2007-07-15 Thread Steven Hilton
On Jul 14, 6:37 pm, "Miguel Filho" <[EMAIL PROTECTED]> wrote: > On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > > > > > I'm working on a web app where if a particular conditions is met in > > particular object, a number of objects in another class/table need to > > be altered. Basically a

Re: Updating multiple rows with Django DB API?

2007-07-14 Thread Miguel Filho
On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > > I'm working on a web app where if a particular conditions is met in > particular object, a number of objects in another class/table need to > be altered. Basically a trigger, but I'm trying to keep all my logic > in the app for the time

Updating multiple rows with Django DB API?

2007-07-14 Thread Steven Hilton
I'm working on a web app where if a particular conditions is met in particular object, a number of objects in another class/table need to be altered. Basically a trigger, but I'm trying to keep all my logic in the app for the time being. I'm wondering if there's a way to do this with the Django