Bug #51477 [NEW]: bind chinese Param to prepare statment return null
| From: | cage dot liu at gmail dot com | Date: | Mon, 05 Apr 2010 11:28:49 +0000 |
| Subject: | Bug #51477 [NEW]: bind chinese Param to prepare statment return null | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-149316@lists.php.net to get a copy of this message | ||
From:
Operating system: windows2003
PHP version: 5.2.13
Package: PDO related
Bug Type: Bug
Bug description:bind chinese Param to prepare statment return null
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
--
Edit bug report at http://bugs.php.net/bug.php?id=51477&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51477&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51477&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51477&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51477&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51477&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51477&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51477&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51477&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51477&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51477&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51477&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51477&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51477&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51477&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51477&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51477&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51477&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51477&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51477&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51477&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51477&r=mysqlcfg