Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getConnection()
- {
- if (!$this->_connection) {
- $this->_setConnection();
- }
- return $this->_connection;
- }
- private function _setConnection()
- {
- if (!$this->_connection) {
- $this->_connection = Mage::getSingleton('core/resource')->createConnection(self::EXTERNAL_RESOURCE_NAME, 'pdo_mysql', $this->getConfig());
- }
- }
- $dbConnection = $this->getConnection();
- $sql = $dbConnection->query("select...");
- $res = $sql->fetchAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement