Hi,
I’m new to codeIgniter so please bear with me,
I am using the following code to save data collected from a form into a MySQL database.
$query = $this->db->query("INSERT INTO competition_answers (competition_id, question_id, user_id, answer) VALUES (".$this->db->escape($competition_id).", ".$this->db->escape($value).", ".$this->db->escape($user_id).", ".$this->db->escape($answer).") ");which produces the following query
INSERT INTO competition_answers (competition_id, question_id, user_id, answer) VALUES (1, '3', '27', 'test with £')and work apart from the £ symbol not being inserted into the table.
I have set the encoding to UTF8 and the database collation is set to the same. If I run the above query directly in phpMyAdmin the query run correctly and the £ symbol is insert correctly.
I am able to save other symbol such as !”$%^&* fine just the £ is missing.
Not sure where to start debugging?
Any suggestions?
Thanks for your help!!!