Answered step by step
Verified Expert Solution
Question
1 Approved Answer
configuration = AppConfig ( reload = True ) if not request.env.web 2 py _ runtime _ gae: # # if NOT running on Google App
configuration AppConfigreloadTrue
if not request.env.webpyruntimegae:
#
# if NOT running on Google App Engine use SQLite or other DB
H
db DALmysql:root:root@localhosttestsetencodingutfmb
migrateenabledFalse
else:
#
# connect to Google BigTable optional 'google:datastore:namespace
#
db DALgoogle:datastorendb
# store sessions and tickets there
#
session. connect request response,
# # or store session in Memcache, Redis, etc.
# from gluon.contrib. memdb import MEMDB
# from google.appengine.api.memcache import client
# session.connectrequest response, Client
#
db definetableauthors
Fieldid 'integer'
Fieldname requiresISNOTEMPTY
fieldbio 'text'
fieldemail requiresISEMAIL
db definetablebooks
field'id 'integer'
fieldtitie requiresISNOT EMPTY
Fieldauthor 'reference authors'
fieldpublicationyear', 'integer', requiresISINTINRANGE
Using DAL how would you select all books authored by author "Ahmed" who has id
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started