Query does not recognize variables in Codeigniter

0

When doing an update in codeigniter, it does not recognize the variable that I am passing to it.

public function actualizaPropiedadModel($tipoPropiedad,$cItem)
{
    $data       = array('tDescripcion' => $tipoPropiedad);
    $this->db->where('iSeqTabla',56);
    $this->db->where('cItem',$cItem);

    $query = $this->db->update('tablaxxx',$data); 

    if($query){ return 1; } else{ return 0; } 
}

If I do echo to $ typeProperty or $ cItem, it shows them well, the problem arises when I put them into the query, it brings the data to 0

UPDATE tablexxx SET tDescription = 0 WHERE iSeqTable = 56 AND cItem = 0

    
asked by Sam Vásquez 12.06.2017 в 18:28
source

0 answers