This is my db db = DAL('sqlite://storage.sqlite') db.define_table('entry', Field('name'), Field('location'), Field('state_of_origin'), Field('local_govt'), Field('file', 'upload'), Field('posted_on','datetime',readable=False,writable=False) )
I want to extract only the values from my db table called "entry" using crud. I understand i have to do this name = crud.select(db.entry, query) But because i don't know the fomular for extracting the query, I did this name = crud.select(db.entry, fields=['name']) I got the fields with the values as result. I just want the values only! Please help me with the formular for getting each of the values in my table using query. Action Controller def zone(): db.entry.posted_on.default = request.now form=crud.create(db.entry, next=URL('zone'), message=T('Record created')) name = crud.select(db.entry, fields=['name']) location = crud.select(db.entry, fields=['location']) state = crud.select(db.entry, fields=['state_of_origin']) lga = crud.select(db.entry, fields=['local_govt']) image = crud.select(db.entry, fields=['file']) View I rep {{=lga}}, {{=state}} State. By {{=name}}<br/> lives in {{=location}} on {{=how can I show the time here?}} ABOVE IS EXACTLY HOW I WANT IT TO APPEAR. -- 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.