Home > Backend Development > PHP Tutorial > php + oracel 有关问题

php + oracel 有关问题

WBOY
Release: 2016-06-13 13:23:21
Original
758 people have browsed it

php + oracel 问题?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--> $strSql = "SELECT BUYER_ID, BUYER_NAME FROM apps.buyr_info  WHERE BUYER_NAME LIKE 'a%' ";

 $conn = odbc_connect('cle','evlp','evlp',SQL_CUR_USE_ODBC) or die ("连不上数据源");
  
  $result =odbc_do($conn,$strSql)or die("执行不到声明");

  while(odbc_fetch_row($result)){
     $BUYER_NAME =odbc_result($result,1);  
     echo " MM NN PP ";
     echo $BUYER_NAME;
 }
Copy after login


 我运行以上代码 
界面上得不到任何数值《。
我单独把 $strSql 放到 Pl/sql中 能得到多条记录..

如果我把Sql语句换成
SQL code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$strSql = "SELECT BUYER_ID, BUYER_NAME FROM apps.buyr_info  ";
Copy after login


此时界面就能得到记录〈,


请问什么原因。。。



------解决方案--------------------
直接dump $result 看看。

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