1.if(($result=OCIExcute($stmt))!="")2.OCIFetchStatement($stmt,$array)

解决方案 »

  1.   

    OCIColumnIsNULL -- Test whether a result column is NULL
      

  2.   

    谢谢两位!!!to:yuepengfei(刁馋)
    提示以下错误:
    Warning: OCIStmtExecute: ORA-00936: missing expression 
    Fatal error: Call to undefined function: ociexcute() 请问$result是什么?
    我的意图是:如果查询结果为空,则输出一个提示页面,若不为空,
    则继续该页面执行
    to:calljia(边缘游走)
    您的意思是if(OCIColumnIsNULL($stmt)==NULL)?
      

  3.   

    不好意思,ociexecute()被写成了ociexcute() 
    $result是指语句执行结果
    你也可以通过ocinumrows来做(不知道这次单词写错没有:p)
      

  4.   

    TO:calljia(边缘游走)你的办法可行,可是,不管是那种结果,
    页面总出现下面的两个Warning,怎么将它们去掉呢Warning: OCIStmtExecute: ORA-00936: missing expression 
    Warning: Wrong parameter count for ocicolumnisnull()
      

  5.   

    哈哈,再次感谢!!鞠躬!!TO:yuepengfei(刁馋)可以实现,可是一样出现上面的两个Warning,该怎么办呢??
    是我其它什么地方写错了吗?
      

  6.   

    $query="select f_num from gg where rep_date=to_date($date1,'yyyymm')";
     $stmt=ociparse($db_connected,$query);
     ociexecute($stmt);
    if(($result=OCIExecute($stmt))=="")
    {
    echo'<head>';
    echo"<meta http-equiv=\"content-Type\" content=\"text/html; charset=gb2312\">";
    echo"<link rel=\"stylesheet\" href=\"baobiao.css\" type=\"text/css\">";
    echo'</head>';
    echo"<body bgcolor='#DEE2DE'>";
    echo('<p>&nbsp;</p><font size=2><center>对不起,报表已经录入过,您不能重复录入!</center></font>');
    echo'</body>';
    ocifreestatement($stmt);
        ocilogoff($db_connected);
    exit;
    }
    else
    {
        ocifreestatement($stmt);
        ocilogoff($db_connected);
    }谢谢!!!
      

  7.   

    不,是出现Warning: OCIStmtExecute: ORA-00936: missing expression
      

  8.   

    ociexecute($stmt);
    if(($result=OCIExecute($stmt))=="")把上面的那个ociexecute($stmt)去掉
      

  9.   

    谢了,结帖!(leexhy欢天喜地的说)