I have very strange problem...It looks like i can't update database ( from textarea field ) when i'm using variable inside query. Sample from model:
This works:
public function update_vendor_about ( $id, $txt )
{
$data = array ( "vendor_about" => $txt, );
$this->db->where("id", $id);
$this->db->update("users", $data);
}
but, this does not work:
public function update_vendor_about ( $id, $txt )
{
$data = array ( "vendor_about" => 'sometext', );
$this->db->where("id", $id);
$this->db->update("users", $data);
}
Call from controller:
$message = $this->input->post('profile_about');
$this->user_model->update_vendor_about ( $active_user_id, $message );
Model gets $txt
OK, i can see it and output it properly.
Same thing happens if i write entire UPDATE
query manually.
I think problem could be in actual $txt
content, so i tried with trim()
, stripslashes()
, replacing
, etc, but nothing helps...
Any ideas?