$ten_desc=$_REQUEST['frm_num'];
$sql = "select * from TENDER_REG where TENDER_DESC LIKE:ten_desc%'";
$stmt=oci_parse($conn,$sql);
oci_bind_by_name($stmt,':ten_desc',$ten_desc);
显示错误请帮助
答案 0 :(得分:0)
SQL查询字符串可能会混淆PHP和ORACLE。以下内容对两者都更有意义。 1)查询字符串中有一个明确的占位符。 2)传递的值已完成。
未经测试:
替换:
$sql = "select * from TENDER_REG where TENDER_DESC LIKE:ten_desc%'";
使用:
$sql = "select * from TENDER_REG where TENDER_DESC LIKE :ten_desc";
和
oci_bind_by_name($stmt,':ten_desc',$ten_desc);
使用:
oci_bind_by_name($ stmt,':ten_desc',$ ten_desc。'%');