Welcome Guest, Not a member yet? Register   Sign In
db->update blanks out data array values
#2

So, I've confirmed that this is a PDO driver issue, ODBC and MYSQL drivers do not have this problem. Sadly, I gotta have PDO for a very large project that will run on 200+ servers, and I really want to use CI3 for it.

Sorry for not code quoting on the last post, lets see if I get it right this time.
I'd really be interested in hearing from anyone with ideas around this - thanks to the CI community.

<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;
</code>

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
RE: db->update blanks out data array values - by bitwizard - 03-18-2015, 08:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB