Hello I am inserting data in MySQL table using codeigniter by following query
$subcat_name="Hellome� testing";
$this->db->insert("table",array("name"=>"$subcat_name");
I am echoing its Equivalent SQL Query is following
INSERT INTO `table` (`name`) VALUES ('Hellome� testing');
Question:
Why data is not inserted in Database while SQL Query is proper?
utf8_encode($subcat_name)before you pass$subcat_nameto the insert functionHellome testing