Page 1 of 1

php can not select Chinese font from ORACLE Server?

Posted: Sun Feb 16, 2003 10:37 pm
by kerokero
When select * from test,web page can show chinese font.
When select * from test where name="公司", the web page show nothing.
I am sure that there "公司" record in name filed.

putenv("ORACLE_SID=flow.test.com");
putenv("ORACLE_HOME=/u01/oracle/product/9.2.0.1/");
putenv("TNS_ADMIN=/u01/oracle/product/9.2.0.1/network/admin");

$handle = ora_plogon("sys@flow", "password");
$cursor = ora_open($handle);
ora_commitoff($handle);
$query = "SELECT * FROM database.filedname WHERE NAME='公司'";
ora_parse($cursor, $query) or die;
ora_exec($cursor);
echo "<HTML><PRE>\n";
echo "$query\n\n";
$numcols = 0;

while(ora_fetch($cursor)){
$numcols = ora_numcols($cursor);
for($column=0; $column < $numcols; $column++){
$data = trim(ora_getcolumn($cursor, $column));
if($data =="") $data = "NULL";
echo"$data\t";
}
echo "\n";
}

Posted: Mon Feb 17, 2003 2:53 am
by twigletmac
I have moved this (and your other) post to the Databases forum as they are database rather than PHP specific questions.

Mac