sure the other process has commit()ed the changes ? that's what 
transactions are for: until a change is commit()ed, no changes are visible.


BTW: mysql has the weirdest default setting of not allowing to see changes 
from OTHER processes until the process which reads commit()s itself (which 
may be your case). 
Try to call db.commit() on the "shell" process even if you didn't issue any 
update() statement yet. The restriction explained earlier still applies: if 
the other process doesn't commit(), your shell will still see no changes at 
all.

On Friday, April 1, 2016 at 5:07:52 PM UTC+2, Marcello wrote:
>
> I tried it.
> It gives me the old value.
> I have to leave the shell and enter again to refresh it...
>
> This is my problem
>
>
>
> On Friday, April 1, 2016 at 11:53:52 AM UTC-3, Niphlod wrote:
>>
>> yep, you need to re-select it ...
>>
>> On Friday, April 1, 2016 at 3:26:39 PM UTC+2, Marcello wrote:
>>>
>>> Hello,
>>>
>>> I have a function that I call in a shell...
>>> I load a record from a database and do some stuff..
>>>
>>> Problem is that in the meantime the record may be modified in the 
>>> server...
>>>
>>> Is there a way to reload the record from the database to track possible 
>>> changes ??
>>> (I'm using mysql)
>>>
>>>
>>> Thanks,
>>>
>>> Marcello
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to