[eluser]Giga[/eluser]
Hi friends,
I just started using code igniter and unfortunately in front of a strange problem!
I use xampp 1.7.3 with the latest version of CI.
I have created a model:
Code:
class User_model extends Model{
function AddUser($options=array())
{
$utente = array('username'=>$options['username'],
'pass'=>$options['pass'],
'tipo'=>$options['tipo'],
'p_iva_pv'=>$options['p_iva_pv']);
$this->db->insert_string('utente',$utente);
return $this->db->insert_id();
}
}
So i have created Controller:
Code:
class Blog extends Controller {
function prova()
{
$user=array('username'=>'giuseppe','pass'=>'prova','tipo'=>4,'p_iva_pv'=>'01234');
$this->load->model('user_model');
$a = $this->user_model->addUser($user);
echo $a;
}
}
Now calling .../index.php/Blog/prova/ return on desktop value 0(zero)
If control phpmyadmin not added any lines
Why return zero(0) and not added the line on db?