php can not select Chinese font from ORACLE Server?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
kerokero
Forum Newbie
Posts: 2
Joined: Sun Feb 16, 2003 10:03 pm

php can not select Chinese font from ORACLE Server?

Post 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";
}
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I have moved this (and your other) post to the Databases forum as they are database rather than PHP specific questions.

Mac
Post Reply