有人可以帮我解决这个问题吗。
function get_shareSearch($conn, $searchBy) {
$id = "";
if(isset($_GET['share']))
{
$id = $_GET['share'];
if($id == "%")
{
$id = "This is not going to work";
}
}
$statement = db_create_statement($conn, "SELECT DISTINCT * FROM shares WHERE company LIKE '%" . $id . "%' OR issue_date LIKE '%" . $id ."%' ORDER BY $searchBy ASC" );
db_bind($statement, ':id', $id);
$resultset = db_fetch_resultset($statement);
return $resultset;
}
function db_bind($statement, $name, $value) {
return oci_bind_by_name($statement, $name, $value, 30);
}
警告:oci_bind_by_name():ORA-01036:非法变量
任何人都可以帮助我如何在oracle语句中更改变量id所以我仍然可以连接到那个能够绑定变量吗?谢谢。
db_bind($statement, ':id', $id);