[英]Oracle Error in oci_parse()
I have the following error 我有以下错误
Warning: oci_parse() expects parameter 1 to be resource, boolean given in C:\\wamp\\www\\JQueryMobileTest\\submit.php on line 28
警告:oci_parse()期望参数1为资源,在第28行的C:\\ wamp \\ www \\ JQueryMobileTest \\ submit.php中给出布尔值
this is my code : 这是我的代码:
<?php
$sql="UPDATE table1 SET updated_date =SYSDATE ,trx_status ='Submitted' where TO_CHAR(trx_date, 'mm/dd/yyyy') LIKE '%$search%' AND trx_status = 'Saved'";
$res= oci_parse($link, $sql);
oci_execute($res);
?>
i don't konw whats the problem ,, please any one can help me ? 我不知道这是什么问题,请有人可以帮助我吗?
If $link
is boolean, then most likely its value is false
. 如果
$link
为布尔值,则很可能其值为false
。 This happens when connection to database failed. 与数据库的连接失败时,会发生这种情况。
oci_connect
returns false
if an error happened. 如果发生错误,
oci_connect
返回false
。 See documentation for more details. 有关更多详细信息,请参见文档 。
You can find the error by calling oci_error()
. 您可以通过调用
oci_error()
找到错误。 Example from the documentation: 文档中的示例:
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.