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.