Welcome Guest, Not a member yet? Register   Sign In
view query created by $this->db->insert
#1

[eluser]xerosis[/eluser]
I have made a query using $this->db->insert but it is not working, how can I review the query itself to see where the problem is coming from?

I can not save $this->db->insert in a variable and echo that variable.

How is this done?
#2

[eluser]Cristian Gilè[/eluser]
Enable the debug in the database.php config file.

Code:
$db['default']['db_debug'] = TRUE;


Cristian Gilè
#3

[eluser]xerosis[/eluser]
Thanks.

Now a new question, in my form I have many textboxes two of them being:

password and passwordconfirm

Now when I want to do:
Code:
$this->db->insert('user', $options);

Of course I get an error saying unknown: passwordconfirm. How can I remove this from my array rather than adding every single one manually within it?

Thanks.
#4

[eluser]Cristian Gilè[/eluser]
Unset passwordConfirm from the $_POST array.
Code:
unset($_POST['passwordconfirm']);


Cristian Gilè




Theme © iAndrew 2016 - Forum software by © MyBB