Anthony, I understand that.
If set.update() updates data on a collection of records, row.update()
should update data in just one record. It makes more sense to me.
Web2py newcomers think about using row.update() to update data on db.
It's is a trick, in my oppinion. Aftwards, Row represents a row
On Thursday, November 17, 2011 4:19:16 PM UTC-5, viniciusban wrote:
>
> I'm saying that:
> row.update() doesn't alter database contents, as set.update() does.
>
> Same verb, different behaviour.
>
Why should it have the same behavior -- it's the same verb, but operating
on instances of different c
I'm saying that:
row.update() doesn't alter database contents, as set.update() does.
Same verb, different behaviour.
On Thu, Nov 17, 2011 at 4:50 PM, Anthony wrote:
> On Thursday, November 17, 2011 12:21:08 PM UTC-5, viniciusban wrote:
>>
>> By the way, isn't it quite strange that same verb (u
On Thursday, November 17, 2011 12:21:08 PM UTC-5, viniciusban wrote:
>
> By the way, isn't it quite strange that same verb (update) being used
> to make two different things?
What do you mean?
By the way, isn't it quite strange that same verb (update) being used
to make two different things?
On Wed, Nov 16, 2011 at 12:12 PM, Anthony wrote:
> On Wednesday, November 16, 2011 8:57:10 AM UTC-5, Tito Garrido wrote:
>>
>> "sandbox/models/db_functions.py"
>>
>> def test(id):
>> r=db.myt
Good Catch both of you! :-)
update_record works!
Thanks!
On Wed, Nov 16, 2011 at 12:12 PM, Anthony wrote:
> On Wednesday, November 16, 2011 8:57:10 AM UTC-5, Tito Garrido wrote:
>>
>> "sandbox/models/db_functions.**py"
>> def test(id):
>> r=db.mytable[id]
>> r.update(state=55)
>
>
> In
On Wednesday, November 16, 2011 8:57:10 AM UTC-5, Tito Garrido wrote:
>
> "sandbox/models/db_functions.py"
> def test(id):
> r=db.mytable[id]
> r.update(state=55)
In the above, 'r' is a Row object, so all you are doing is updating the Row
object itself, not the original record in the db.
7 matches
Mail list logo