• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
db->update blanks out data array values

#1
Has anyone seen this before?
db->update and db->update_string both blank out every value in the data array when producting a query.
This is CI3.  Using PDO driver.  Thanks in advance.

Code:
      $data = array( 'title' => 'one',
                               'description' => 'descone',
                               'shared' => 'yes',
                               'active' => 'yes',
                               'query' => $this->input->get_post("query")
                             );        
        print_r($data);

         $where = "id=1";
         $sql = $this->db->update_string('widgetsdef', $data, $where);          
         echo $sql;

Output:

Array ( [title] => one [description] => descone [shared] => yes [active] => yes [query] => )

UPDATE widgetsdef SET title = '', description = '', shared = '', active = '', query = '' WHERE id = 1
Reply


Messages In This Thread
db->update blanks out data array values - by bitwizard - 03-13-2015, 01:02 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.