QueryBuild appends undeclared column names, need to reset qb_set |
Today I came across a strange phenomena with Query Builder.
Whenever I use $this->db->insert($array_to_insert), it appends two undeclared table names to the query causing it to fail. I found the culprit when I used var_dump(db) and found the two inside the array qb_set: ["qb_set":protected]=> array(2) { ["`col_1`"]=> string(2) "''" ["`col_2`"]=> string(2) "''" } How do you guys recommend resetting this array properly? I swear I do not use col_1 and col_2 nowhere near where I perform insertions.
You can't use $this->db->insert($array_to_insert) like that.
$this->db->insert() expects 2 parameters. The first one is the table name, the second one is an array with field names and values for that table. |
Welcome Guest, Not a member yet? Register Sign In |