Hi!!
My question is: In a custom model It's possible to know if a select has affected to some row?
Something like that:
class MyModel extends \Phalcon\Mvc\Model
{
public function customSQL()
{
$mysql = 'DELETE FROM XXX WHERE condition=1';
$this->getModelsManager()->executeQuery($mysql);
return ($this->getReadConnection()->affectedRows()!=null) &&
$this->getReadConnection()->affectedRows()>0;
}
}
Even on sql success, always $this->getReadConnection()->affectedRows() is null ... :(
Any idea?, what am I doing wrong?