Welcome Guest, Not a member yet? Register   Sign In
Sql Insert Help
#3

[eluser]ray73864[/eluser]
how would that work anyway?

now, if you did this:

Code:
$data = array(
               'firstName'=>$this->input->post('firstName'),
               'lastName'=>$this->input->post('lastName'),
               'username'=>$this->input->post('username'),
               'password'=>$this->input->post('password'),
               'email'=>$this->input->post('email')
        );

$this->db->insert('users', $data);

Another way that would work if i recall correctly:

Code:
$this->db->insert('users',$_POST);

The way you are doing it though, is to insert $this into the DB, unfortunately that is an object not an array.


Messages In This Thread
Sql Insert Help - by El Forum - 01-05-2009, 02:31 PM
Sql Insert Help - by El Forum - 01-05-2009, 09:00 PM
Sql Insert Help - by El Forum - 01-05-2009, 09:11 PM
Sql Insert Help - by El Forum - 01-05-2009, 09:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB