|
@ -61,9 +61,9 @@ abstract class Model |
|
|
return new ModelSelectResult($res); |
|
|
return new ModelSelectResult($res); |
|
|
case 'insert': |
|
|
case 'insert': |
|
|
case 'replac': |
|
|
case 'replac': |
|
|
return new ModelInsertResult($this->handler); |
|
|
|
|
|
|
|
|
return new ModelInsertResult($this->handler, $res); //$res for postgreSQL
|
|
|
default: |
|
|
default: |
|
|
return new ModelChangeResult($this->handler); |
|
|
|
|
|
|
|
|
return new ModelChangeResult($this->handler, $res); //$res for postgreSQL
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -202,9 +202,9 @@ class ModelChangeResult extends ModelResult |
|
|
{ |
|
|
{ |
|
|
public $affected; |
|
|
public $affected; |
|
|
|
|
|
|
|
|
function __construct($resource) |
|
|
|
|
|
|
|
|
function __construct($resource, $result) |
|
|
{ |
|
|
{ |
|
|
$this->affected = DBConnector::affectedRows($resource); |
|
|
|
|
|
|
|
|
$this->affected = DBConnector::affectedRows($resource, $result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function count() |
|
|
function count() |
|
@ -217,9 +217,9 @@ class ModelInsertResult extends ModelChangeResult |
|
|
{ |
|
|
{ |
|
|
public $id; |
|
|
public $id; |
|
|
|
|
|
|
|
|
function __construct($resource) |
|
|
|
|
|
|
|
|
function __construct($resource, $result) |
|
|
{ |
|
|
{ |
|
|
parent::__construct($resource); |
|
|
|
|
|
|
|
|
parent::__construct($resource, $result); |
|
|
$this->id = DBConnector::getId($resource); |
|
|
$this->id = DBConnector::getId($resource); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|