|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-05 13:46 UTC] cage dot liu at gmail dot com
[2010-04-05 14:11 UTC] cage dot liu at gmail dot com
[2013-06-12 03:55 UTC] ssufficool@php.net
-Summary: bind chinese Param to prepare statment return null
+Summary: PDO_OCI: bind chinese Param to prepare statment
return null
[2014-01-01 12:49 UTC] felipe@php.net
-Package: PDO related
+Package: PDO OCI
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
Description: ------------ when use prepare statment ,binding chinese string to ? or var return empty result . Test script: --------------- $ora = new pdo("oci:dbname=//host:1521/racl;charset=zhs16gbk",$urp_user,$urp_pass,array(PDO::ATTR_PERSISTENT => false)); $sql = "select gh,xm from t where xm like ? order by xmpy"; $stmt = $ora ->prepare($sql); $stmt->bindParam(1,strtoupper($_GET['xmpy'].'%'); $stmt->execute(); $r = $stmt->fetchAll(PDO::FETCH_ASSOC); //$r = $ora->query_all("select gh,xm from t where xm like '".iconv('utf-8','gbk',$_GET['xmpy'])."%'"); file charset is utf-8.the build-in sql works fine