Re: [web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-08-02 Thread 'Matthew J Watts' via web2py-users
Many thanks for your help all, i'm slowly getting my head around it. I'll post the code once it's finished in case anyone needs it in future cheers Matt On Wed, Aug 1, 2018 at 7:41 AM, sandeep patel wrote: > @Mattew J Watts, > #Model > > db.define_table('person', > Field('n

Re: [web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-07-31 Thread sandeep patel
@Mattew J Watts, #Model db.define_table('person', Field('name'), Field('age'), Field('country'), format='%(name)s') db.define_table('thing', Field('person_id,'reference preson')

[web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-07-31 Thread Anthony
On Tuesday, July 31, 2018 at 2:24:51 PM UTC-4, pbreit wrote: > > I know db.thing.insert will return the ID of the newly created record and > am pretty sure update_or_insert does as well. I'm not exactly sure how you > would determine if an update or insert was performed (but perhaps you do > not

[web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-07-31 Thread pbreit
I know db.thing.insert will return the ID of the newly created record and am pretty sure update_or_insert does as well. I'm not exactly sure how you would determine if an update or insert was performed (but perhaps you do not need to know?). http://web2py.com/books/default/chapter/29/06/the-dat

[web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-07-31 Thread 'Matthew J Watts' via web2py-users
ps - i'm getting the file locally as i havent worked out the .retrieve: method yet On Tuesday, July 31, 2018 at 6:51:41 PM UTC+2, Matthew J Watts wrote: > > Hello all > > I'm trying to build a .csv data upload facility which will update two > tables in sequence. So, i have my 'person' table w