Thanks Anthony, That works! I've changed other queries giving me this error and it works fine now. Thanks a million. :)
Sincerely, Rahul D. On Jan 10, 7:46 pm, Anthony <abasta...@gmail.com> wrote: > On Monday, January 9, 2012 11:54:08 PM UTC-5, Rahul wrote: > > > I did not get it... > > What would be an equivalent query I would need to pass for below? I > > need to just select rows (Friend_name column for all status that are > > Friend and reguserid is whatever the logged in users id) for below > > conditions - I thought select was a valid query! Please suggest > > > Existing - > > query = db((db.friends.reguserid==session.logged_in_user_id) & > > (db.friends.status=="Friend")).select(db.friends.friend_name) > > No, the above is not a query -- it is a Rows object, which is the result of > a select. The query is this part: > > query = (db.friends.reguserid==session.logged_in_user_id) > & (db.friends.status=="Friend") > > If you only want the table to show the friend_name column, then you can > specify the that in the "fields" argument: > > SQLFORM.grid(query, fields=[db.friends.friend_name], ...) > > Anthony