I’m trying to populate a drop down navigation bar from a web2py database of product names. The table is defined in db.py like so:
db.define_table('product',
Field('prodid', unique=True),
Field('name'),
Field('stock', 'integer'))
I’ve done a bit of research and found heaps of ways to do it with PHP from an SQL database but I haven’t been able to find anything about retrieving from a local database in web2py.
Any help would be appreciated.
Try this: