这是我的疑问:
select id
from inquiry
where id = (select min(id) from inquiry where (id > 108 AND is_deleted=N))
此查询有什么问题? 我希望在嵌套中将id与108进行比较,结果将大于108,但它返回布尔值
使用参数调用函数 nextIdUserInquiry(108,$ con,' N');
并且整个功能体位于
之下function nextIdUserInquiry($inquiryId, $conn, $cond)
{
echo "in function";
$qry="select id from inquiry where id = (select min(id) from inquiry where (id > $inquiryId AND is_deleted=$cond))";
echo $qry;
$result = $conn->query($qry);
$row = $result->fetch_assoc();
echo $row["id"];
}
和mysql错误就是这样 "在C:\ xampp \ htdocs \ besttour \ admin \ connect_db_test.php"中调用boolean上的成员函数fetch_assoc();