Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 50 → Rev 51

/trunk/Db/Database.php
1,5 → 1,7
<?php
 
namespace PointedEars\PHPX\Db;
 
require_once __DIR__ . '/../global.inc';
require_once __DIR__ . '/../AbstractModel.php';
 
21,7 → 23,7
* Last success value of the database operation
* @author Thomas Lahn
*/
class Database extends AbstractModel
class Database extends \PointedEars\PHPX\AbstractModel
{
/* Access properties */
 
189,7 → 191,7
if ($this->_connection === null)
{
$this->_connection =
new PDO($this->_dsn, $this->_username, $this->_password, $this->_options);
new \PDO($this->_dsn, $this->_username, $this->_password, $this->_options);
}
 
return $this->_connection;
479,7 → 481,7
* @see PDOStatement::fetchAll()
*/
public function select($tables, $columns = null, $where = null,
$order = null, $limit = null, $fetch_style = PDO::FETCH_ASSOC)
$order = null, $limit = null, $fetch_style = \PDO::FETCH_ASSOC)
{
if (is_null($columns))
{
839,7 → 841,7
 
if (is_null($fetch_style))
{
$fetch_style = PDO::FETCH_ASSOC;
$fetch_style = \PDO::FETCH_ASSOC;
}
 
if (!is_null($ctor_args))