Insert query failing when using $this->db->query() and not otherwise |
[eluser]Aeisor[/eluser]
I have a query that is failing using Code: $this->db->query() Code: $this->db->last_query() Code: INSERT INTO users (forename, surname, phone, email, pass) VALUES (?, ?, ?, ?, ?) becomes Code: INSERT INTO users (forename, surname, phone, email, pass) VALUES ('Name', 'Name', NULL, '[email protected]', 'password') This does not return an error, or an object. It returns FALSE. Phone is allowed to be NULL. As it works directly (phpmyadmin and using mysqli_query), the query must be fine... Any ideas?
[eluser]Aeisor[/eluser]
I've done a var_dump inside mysqli_driver's _execute method and removed the @ suppression. Still nothing. Query fails and it shouldn't - at least not for a reason I can see. I hope I'm not looking for something more complicated than it is.
[eluser]Aeisor[/eluser]
Too hasty. Seems there was a NOT NULL field that wasn't in the INSERT that didn't like the CI query (?) but didn't mind being run manually. |
Welcome Guest, Not a member yet? Register Sign In |