[eluser]Unknown[/eluser]
I have a problem with this insert funcion
function inserirCategoria($id_pare,$nom,$actiu,$ordre) {
$nou_ordre=$ordre+1;
$categoria = array ('nom' => $nom,
'id_pare' => $id_pare,
'actiu' => $actiu,
'ordre' => $nou_ordre);
$this->db->insert('categories', $categoria);
return $this->db->insert_id();
}
In database 'id_pare' is an integer and the function always insert 0,but $id_pare have the correct value.What´s the problem?Because reading codeigniter user guide I think the array is correctly made