In fact order by in updates statements is usefull when you use some
inner join to get the data you want to set, and when the join gives
some 1-n results. If I remember that correctly, the last value is the
one that will be set.

peremen, you can execute any arbitrary SQL statement with the query()
method of your db instance.


On Aug 5, 5:43 am, Primoz Anzur <[email protected]> wrote:
> I've checked the docs, and it is a valid query. (In combination with LIMIT)
> HOWEVER; the sole usage of that query indicates a bad Db design. Really bad
> Db design.
>
> On 5 Aug 2010 01:29, "Justin Davis" <[email protected]> wrote:
>
> What would that statement do? I'm not sure I see what happens. For
> instance:
>
> UPDATE table_foo SET value_bar=baz ORDER BY id desc;
>
> What does the order by do in that statement? The update doesn't return
> results, so it's unclear what order is being manipulated.
>
> By the way, you can always do db.query if something is unsupported by
> the basic database module.
>
> On Aug 4, 1:07 am, peremen <[email protected]> wrote:
>
> > I reported this issue inhttps://bugs.launchpad.net/webpy/+bug/598080
> > at 2 months ago, as I got no reply, I am trying to post here.
>
> > Although UPDATE ... SET ... ORDE...

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to