I need to send some xml that I trust (I wrote it) to my mysql database.
ActiveRecord escapes a lot of my XML. When I pull it out of the database, I am not using CodeIgniter, so I need clean XML in the database.
Thanks in advance.
Read function set in active record. Below is the snippet from the documentation.
This function enables you to set values for inserts or updates. set() will also accept an optional third parameter ($escape), that will prevent data from being escaped if set to FALSE. To illustrate the difference, here is set() used both with and without the escape parameter.
$this->db->set('field', 'field+1', FALSE);
$this->db->insert('mytable');
// gives INSERT INTO mytable (field) VALUES (field+1)
$this->db->set('field', 'field+1');
$this->db->insert('mytable');
// gives INSERT INTO mytable (field) VALUES ('field+1')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With