Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB