observation: "db_name" is a table name.
What do you expect to be returned by .select(db_field)?
it is a list of rows, where row is a DAL object.

usually written like this:
rows = db(query).select()

It seems you haven't noticed this yet since your code uses a singular form 
"db_record".
You then take the entire first element of this list (an entire row, or 
"record") and convert it to string.
This is very definitely the hard way to do it. The row object allows very 
convenient access to fields which it contains. 

please see 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#select





-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to