the syntax for SQLFORM is: SQLFORM(table, record or record_id)
In your first example you were passing a query instead of a record. Now you are passing db.listing[query] . But in this context query should be a record_id instead you are passing db.listing[listing_id] and db.listing.userinfo[auth.user.id] which not a record and not clear what it is. It is not a query. On Sunday, 10 March 2013 19:38:31 UTC-5, Massimo Di Pierro wrote: > > This is not valid dal syntax. Can you explain what is the supposed to do? > > On Sunday, 10 March 2013 19:00:45 UTC-5, Andrew Evans wrote: >> >> I am now getting this error >> >> AttributeError: 'Table' object has no attribute >> 'SUBSTRING(listing.userinfo,5,(6 - 5))' >> >> >> Using this code >> >> listing_id = request.args(0) >> query = db.listing[listing_id] and db.listing.userinfo[auth.user.id] >> query = db.listing[query] >> form = SQLFORM(db.listing, query, formstyle='divs') >> >> any help is greatly appreciated >> >> *cheers >> >> And thank you >> > -- --- 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/groups/opt_out.

