whats wrong with my code?
why cant i connect to my database called "mydb"?
why is it that the adapter doesnt load infact im using factory?
<?php
require_once 'Zend/Config.php';
require_once 'Zend/Db.php';
require_once 'Zend/Db/Adapter/Pdo/Mysql.php';
require_once 'Zend/Loader.php';
try {
$config = array(
'host' => 'localhost',
'username' => '',
'password' => '',
'dbname' => 'mydb',
);
$db = Zend_Db::factory('PDO_MYSQL', $config);
$db->getConnection();
echo "yahoooo";
} catch (Zend_Db_Adapter_Exception $e) {
echo $e;
} catch (Zend_Exception $e) {
echo $e;
}
?>
the output is this...
"exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in C:\PHP\includes\Zend\library\Zend\Db\Adapter\Pdo\A bstract.php:95 Stack trace: #0 C:\PHP\includes\Zend\library\Zend\Db\Adapter\Abstr act.php(271): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 C:\Apache Group\Apache2\htdocs\public\lib\dbconnect.php(33): Zend_Db_Adapter_Abstract->getConnection() #2 {main} "