Hello,
I have a little problem with my code when I execute a Query.
Really I don't understand why show this error:
Can't obtain the model 'nombre' source from the _models list, when preparing: UPDATE institucion SET nombre = :InstitucionName:, rif = :InstitucionRif: WHERE id = :InstitucionId:
I am using this model:
<?php
use Phalcon\Mvc\Model;
class Institucion extends Phalcon\Mvc\Model
{
public $id_institucion;
public $rif;
public $nombre;
}
?>
My Controller is here:
public function Editar2Action($id)
{
if ($id == 'true')
{
if ($this->request->isPost() == true) {
// Form Variables - It's ok
$InstitucionName = $this->request->getPost("nombre", "string");
$InstitucionRif = $this->request->getPost("rif", "string");
$InstitucionId = $this->request->getPost("id", "int");
$this->modelsManager->executeQuery("UPDATE institucion SET nombre = :InstitucionName:, rif = :InstitucionRif: WHERE id = :InstitucionId:", array('InstitucionName' => $InstitucionName, 'InstitucionRif' => $InstitucionRif, 'InstitucionId' => $InstitucionId));
}
}
}
Anybody can help me?, Thanks