So what i am doing is DB manager which support creating of DBs and
also want to Define predefined set of Tables inside DB.
But , as its going to be dynamic , it have to load DBs on the fly ,
inside controllers..
Lile this:
In Controller:
def __createCase(dbName):
import MySQLdb
newdb=MySQLdb.connect(user='root')
cur =newdb.cursor()
r=cur.execute('CREATE DATABASE '+dbName)
if r>0:
return dbName
else:
return "Fail"
def __loadDB(dbName):
loadedDB = DAL("mysql:/r...@localhost/" + dbName)
anyways to do it in the modesl?