PHP expert |
|
Zend_Loader::loadClass('Zend_Db');
//configure the database
$options = array(
'host' => 'localhost' ,
'username' => 'root' ,
'password' => '********' ,
'dbname' => 'database'
);
$db = Zend_Db::factory( 'PDO_MYSQL' , $options );
Zend_Loader::loadClass('Zend_Db'); //configure the database 'host' => 'localhost' , 'username' => 'root' , 'password' => '********' , 'dbname' => 'database' ); $db = Zend_Db::factory( 'PDO_MYSQL' , $options );
Dus zo maak je verbinding met MySQL in ZF. Dan kan je met $db de methode fetchAll("SQL CODE") uitvoeren. |