2

I have my query something like this

INSERT INTO tbl VALUES(UNHEX('some_value'));

How can I pull this query off using codeigniter active record, specifically the '$this->db->set' function

this->db->set('password', $value); // How do I insert the mysql function here
$this->db->insert('tbl');

1 Answer 1

4

Take a look at the documentation - it states that if you need some value unescaped, you should set the third parameter in set() to false. Like this:

$this->db->set("password", "UNHEX('".$value."')", FALSE);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.