applications/dashboard/models/class.exportmodel.php
public function PDO($DsnOrPDO = NULL, $Username = NULL, $Password = NULL) {
		if(!is_null($DsnOrPDO)) {
			if($DsnOrPDO instanceof PDO)
				$this->_PDO = $DsnOrPDO;
			else {
				$this->_PDO = new PDO($DsnOrPDO, $Username, $Password);
				if(strncasecmp($DsnOrPDO, 'mysql', 5) == 0)
					$this->_PDO->exec('set names utf8');
			}
		}
		return $this->_PDO;
	}
public function PDO($DsnOrPDO = NULL, $Username = NULL, $Password = NULL) {
		if(!is_null($DsnOrPDO)) {
			if($DsnOrPDO instanceof PDO)
				$this->_PDO = $DsnOrPDO;
			else {
				$this->_PDO = new PDO($DsnOrPDO, $Username, $Password);
				if(strncasecmp($DsnOrPDO, 'mysql', 5) == 0)
					$this->_PDO->exec('set names utf8');
			}
		}
		return $this->_PDO;
	}
public function PDO ( $ DsnOrPDO = NULL , $ Username = NULL , $ Password = NULL ) { if ( ! is_null ( $ DsnOrPDO ) ) { if ( $ DsnOrPDO instanceof PDO ) $ this -> _PDO = $ DsnOrPDO ; else { $ this -> _PDO = new PDO ( $ DsnOrPDO , $ Username , $ Password ) ; if ( strncasecmp ( $ DsnOrPDO , 'mysql' , 5 ) == 0 ) $ this -> _PDO -> exec ( 'set names utf8' ) ; } } return $ this -> _PDO ; }
Gets or sets the PDO connection to the database.
@param mixed $DsnOrPDO One of the following:
- <b>String</b>: The dsn to the database.
- <b>PDO</b>: An existing connection to the database.
- <b>Null</b>: The PDO connection will not be set.
@param string $Username The username for the database if a dsn is specified.
@param string $Password The password for the database if a dsn is specified.
@return PDO The current database connection.
Gets or sets the PDO connection to the database .