pdo - php turns string quotes to question mark -
im using php pdo , trying insert db string in hebrew contains quotas. inserts text keeps turning quotes('/"/`) question marks, how can prepare ?
the code im using:
$this->db->query("set names 'hebrew'"); $this->db->query("set character_set_client='utf8'"); $this->db->query("set character_set_results='utf8'"); $this->db->query("set collation_connection='utf8'"); $createquery = $this->db->prepare("insert x(y)values (:name"); //$_post['string'] = זאת' "בדיקה" $createquery->bindparam("name",$_post['string']); $createquery->execute();
thanks!
php pdo insert
No comments:
Post a Comment