为什么老是执行else,我输入的用户名在数据库表中是存在的 $user_sql="select staff_id ,sts from t_staff_member where upper(staff_id)='".strtoupper(trim($name))."'";
$user_stmt=OCIParse($conn,$user_sql);
$user_ret=OCIExecute($user_stmt);
if($user_ret){
$user_col=OCIFetch($user_stmt);
if($user_col){
if(OCIResult($user_stmt,2)=="I"){
header ("Location: ./Error_new.php?info=您输入的用户没有通过审核,请返回重新输入!");
exit();
}
}else{
header ("Location: ./Error_new.php?info=您输入的用户名不存在,请返回重新输入!");
exit();
}
}
$user_stmt=OCIParse($conn,$user_sql);
$user_ret=OCIExecute($user_stmt);
if($user_ret){
$user_col=OCIFetch($user_stmt);
if($user_col){
if(OCIResult($user_stmt,2)=="I"){
header ("Location: ./Error_new.php?info=您输入的用户没有通过审核,请返回重新输入!");
exit();
}
}else{
header ("Location: ./Error_new.php?info=您输入的用户名不存在,请返回重新输入!");
exit();
}
}
$user_ret这个打印出来是1
$user_col这个打印什么也没用出来
这表示查询失败了