Home  >  Article  >  Backend Development  >  php + oracel 有关问题

php + oracel 有关问题

WBOY
WBOYOriginal
2016-06-13 10:34:18754browse

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; }


 我运行以上代码 
界面上得不到任何数值《。
我单独把 $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  ";


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


请问什么原因。。。



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

Statement:
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