Good afternoon guys, I'm trying to insert into the database, but I'm having a problem
Below is the method with the error next to my query to perform the insert:
public function setData($data)
{
$this->setId($data['id']);
$this->setNome($data['nome']);
$this->setEmail($data['email']);
$this->setSenha($data['senha']);
}
The error is in the line "$ this-> setData ($ results [0]);"
public function insert()
{
$sql = new Sql();
$results = $sql->query("CALL sp_usuario_insert(:LOGIN, :EMAIL, :PASSWORD)", array(
":LOGIN"=>$this->getNome(),
":EMAIL"=>$this->getEmail(),
":PASSWORD"=>$this->getSenha()
));
if (count($results) > 0) {
$this->setData($results[0]);
}
}
I can not resolve it.