Welcome Guest, Not a member yet? Register   Sign In
Hi There, some odd DB issues..
#1

[eluser]Noy Gabay[/eluser]
So I've been using CI for some time now, and I have now bumped into this weird problem. This code:
Code:
$data = array( 'Title' => $title, 'Content' => $content );
$where = "ID = $ID";
$sql = $this->db->update_string('sitewide', $data, $where);
$this->db->query($sql);
Updates the DB's records to 0. All the values I've been trying to update, are updated to this.
I've also tried doing this, having the same result:
Code:
$data = array('Title' => $title, 'Content' => $content);
$this->db->where('ID', $ID);
$this->db->update('sitewide', $data, "ID = $ID");

The next odd thing is that the function $this->db->last_query() prints out a correct update string, which updates correctly as SQL command directly to mysql.

I'm not even sure of how to debug it, not to mention solving it.

Any kind of help will be very appreciated..


Messages In This Thread
Hi There, some odd DB issues.. - by El Forum - 08-24-2009, 11:54 AM
Hi There, some odd DB issues.. - by El Forum - 08-24-2009, 01:37 PM
Hi There, some odd DB issues.. - by El Forum - 08-24-2009, 03:08 PM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 01:13 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 01:23 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 01:38 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 09:18 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 09:57 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 10:08 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 10:22 AM
Hi There, some odd DB issues.. - by El Forum - 08-25-2009, 10:25 AM
Hi There, some odd DB issues.. - by El Forum - 09-24-2009, 12:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB