快速,持续,稳定,傻瓜式
支持Mysql,Sqlserver数据同步

php连接oracle数据库代码(转)

请联系QQ:1793040 索取软件


$ora_host=”172.19.*.259″; $ora_port=”1521″; $ora_sid=”orasid”;
$ora_username=”orauser”; $ora_password=”orapwd”; $charset=”UTF8″; ### zhs16gbk ### $ora_connstr=”(description=(address=(protocol=tcp)
(host=”.$ora_host.”)(port=”.$ora_port.”))
(connect_data=(service_name=”.ora_sid.”)))”; $conn=oci_connect($ora_username, $ora_password,$ora_connstr); if (!$conn)
{ $e=oci_error(); trigger_error(htmlentities($e[‘message’],
ENT_QUOTES), E_USER_ERROR,$charset); } $stid=oci_parse($conn,
‘SELECT * FROM employees’); oci_execute($stid); echo

\n”; while ($row=oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { echo

\n”; foreach ($row as $item) {
echo ”

\n”; } echo

\n”; } echo

“.($item !==null
htmlentities($item, ENT_QUOTES) : “”).

\n”;

相关推荐

咨询软件
 
QQ在线咨询
售前咨询热线
QQ1793040