I cannot delete database from raw MySql query here. Is there a better way? Please suggest. Is there a way to write a query to drop database in Zend. I'm using Zend 1.11
// Delete db function
public function deleteDB($dbName){
// For database connection
$config = new Zend_Config(
array(
'database' => array(
'adapter' => 'PDO_MYSQL',
'params' => array(
'host' => 'localhost',
'dbname' => $dbName,
'username' => 'root',
'password' => '',
)
)
)
);
$db = Zend_Db::factory($config->database);
//Delete database
$sql = 'DROP DATABASE'. $dbName;
$db->query($sql);