![]() |
Very odd problem with $this->db->set - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Very odd problem with $this->db->set (/showthread.php?tid=12502) |
Very odd problem with $this->db->set - El Forum - 10-21-2008 [eluser]blasto333[/eluser] I am having a really really odd problem using the $this->db->set function. I am using the latest version of codeigniter. Here is the isolated code. Code: function save($item_data,$item_id=false) var_dump of $this->ar_set in the CI_DB_Active_Record_Class var_dump occurs JUST BEFORE Code: $sql = $this->_insert($this->_protect_identifiers($this->dbprefix.$table), array_keys($this->ar_set), array_values($this->ar_set));) array(6) { ["`name`"]=> string(41) "'Duracell AA Alkaline batteries - 4 pack'" ["`category`"]=> string(13) "'Electronics'" ["`item_number`"]=> string(14) "'041333015330'" ["`buy_price`"]=> string(2) "''" ["`unit_price`"]=> string(6) "'4.95'" ["`tax_percent`"]=> string(3) "'8'" } Code: function save($item_data,$item_id=false) var_dump of $this->ar_set in the CI_DB_Active_Record_Class var_dump occurs JUST BEFORE Code: $sql = $this->_insert($this->_protect_identifiers($this->dbprefix.$table), array_keys($this->ar_set), array_values($this->ar_set));) array(11) { ["`name`"]=> string(41) "'Duracell AA Alkaline batteries - 4 pack'" ["`description`"]=> string(41) "'Duracell AA Alkaline batteries - 4 pack'" ["`category`"]=> string(13) "'Electronics'" ["`item_number`"]=> string(14) "'041333015330'" ["`buy_price`"]=> string(2) "''" ["`unit_price`"]=> string(6) "'4.95'" ["`tax_percent`"]=> string(3) "'8'" ["`sale_markdown_percent`"]=> string(2) "''" ["`employee_markdown_percent`"]=> string(2) "''" ["`quantity`"]=> string(2) "''" ["`reorder_level`"]=> string(2) "''" } THIS IS THE EXPECTED OUTPUT!! I AM NOT SURE WHAT IS HAPPENING THAT IS CAUSING FIELDS TO JUST DISAPPEAR FROM $this->ar_set. |