How Zend DB Manage Database Connections
I am using Zend Framework for my PHP developments and here is a small function I used to execute a query. This is not about an error. The code and everything works fine. But I want to know some concept behind this. /** * Get dataset by executing sql statement * * @param string $sql - SQL Statement to be executed * * @return bool */ public function executeQuery($sql) { $this->sqlStatement = $sql; if ($this->isDebug) { echo $sql; exit; } $objSQL = $this->objDB->getAdapter()->prepare($sql); try { return $objSQL->execute(); } catch(Exception $error) { $this->logMessage($error->getMessage() . " SQL