oracle 最后哦那你个插入 clob类型的值出现解决办法

WBOY
Release: 2016-06-13 10:03:24
Original
958 people have browsed it

oracle 最后哦那你个插入 clob类型的值出现
在php连接Oracle的过程中,往表中clob类型的字段插入>4000字符的数据时,会报错:字符串太长。
遇到这种问题该怎么解决呢?
能不能不使用大家所讨论的 存储 方法?
错误提示使用绑定,谁能给个示范的绑定代码?
谢谢了

------解决方案--------------------

putenv("ORACLE_SID=sid1");
putenv("ORACLE_HOME=/u01/app/oracle/product/8.0.5");

$handle = ora_plogon("[email protected]", "TIGER") or die;
$cursor = ora_open($handle);
ora_commitoff($handle);

$query = "SELECT * FROM EMP";
ora_parse($cursor, $query) or die;
ora_exec($cursor);

echo "

\n";<br>echo  "$query\n\n";<br>$numcols = 0;<br>while(ora_fetch($cursor)) {<br>   $numcols = ora_numcols($cursor);<br>   for ($column=0; $column        $data = trim(ora_getcolumn($cursor, $column));<br>       if($data ==  "") $data = "NULL";<br>       echo  "$data\t";<br>   }<br>   echo  "\n";<br>}<br>$numrows = ora_numrows($cursor);<br>echo  "\nROWS RETURNED: $numrows\n";<br>echo  "
Copy after login
\n";

ora_close($cursor);

?>
(接分)
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template