Trying to to get the following working but for some reason getting a can't 
use keyword in expression error.  It's also my understanding that 
validate_and_update should include fields that have actually changed??? 
 Since this would be coming in as an ajax request, I'd rather not go 
through a bunch of gymnastics on the client to figure out what's changed 
and what's not change.  Any clarification would help.  Thanks in advance.

def testSQL():
    leadID  = 1
    mobile  = '555.555.5555'
    email   = 't...@test.com'
    website = 'www.test.com'
    db(db.Leads.id==leadID).validate_and_update(db.Leads.Mobile=mobile,
        db.Leads.Email=email,
        db.Leads.Website=website)

    recs = db(db.Leads.id==1).select(db.Leads.ALL)
    rec = recs[0]
    return dict(rec=rec)

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to