[web2py] Re: how to return nothing

2015-10-15 Thread Alex Glaros
Perfect! thanks Leonel, only took 2 seconds to update 188,146 postal codes on sqlLite on my desktop. I added a db.commit() line afterwards...not sure if needed. Much appreciated! Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: how to return nothing

2015-10-15 Thread Leonel Câmara
Yes that line is wrong, this: db(db.PostalCode.id > 0).update(PostalCode.countryCode = PostalCode.countryCodeFromGeoNames) Should be: db(db.PostalCode.id > 0).update(countryCode = db.PostalCode.countryCodeFromGeoNames) -- Resources: - h

[web2py] Re: how to return nothing

2015-10-14 Thread Alex Glaros
also, could not get this to work db(db.PostalCode.id > 0).update(PostalCode.countryCode = PostalCode.countryCodeFromGeoNames) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: how to return nothing

2015-10-14 Thread Alex Glaros
hey Leonel, do you see anything wrong with syntax for the parts above the return? this didn't work either: for r in db.PostalCode: db(db.PostalCode.id==r.id).update(countryCode = countryCodeFromGeoNames) db.commit() thanks, Alex -- Resources: - http://web2py.com - http://we

[web2py] Re: how to return nothing

2015-10-14 Thread Leonel Câmara
You can actually return None or an empty string. That said you should use the scheduler instead of you calling it once in a while. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues