Thanks. But if I do that doesn't that mean I can't use the results as
objects? Isn't that the reason for the DAL and ORM (does it have an
ORM)? How do I handle the values? I'd also have to insert data.
For a select, you have, from the docs, as_dict=True. I'm new to Python.
Can you show
Please be sure to read the DAL section of the online web2py book it will
explain a lot of this.
When you use executesql you can choose how to see the results the as_dict
means you can address fields/columns as dict keys or you can also use the
fields colnames options to get objects just like
hm, pardon me, not sure what do you want to achieve. is it something like
this?
e.g.
## Use SQLite
db0 = DAL('sqlite://testmultipledb.sqlite')
## Use MySQL
db1 = DAL('mysql://root:@localhost/testmultipledb')
## Use PostgreSQL
db2 = DAL('postgres://postgres:a@localhost/testmultipledb')
I don't know about the syntax. I'm trying to decide which Framework I
should go with. I have one database that has information about personal
details. Another database has information about various purchases, still
another database has information about other family members. This is an
Setup a connection to each of your databases as shown above - then db1 will
represent the connection to the first database, db2 the second and so on -
or you can just as easily name the database connections db_customer,
db_purchases, db_relatives and so on so the names are a bit more
5 matches
Mail list logo