$querySelectItems = "SELECT * FROM auction_items WHERE auction_items.Itm_status = 'Pending' OR auction_items.Itm_status = 'Fail' AND Item_userid = :uid";
$stmtSelectItems = $conn->prepare($querySelectItems);
$stmtSelectItems->bindParam(':uid',$_SESSION['userid']);
$stmtSelectItems->execute();
以上代码无法正常工作,我想选择 itm_status = pending还是itm_status = fail 会列出去掉,但我尝试编写上面的代码无法正常工作〜
答案 0 :(得分:0)
试试这个:
$querySelectItems = "SELECT * FROM auction_items WHERE (auction_items.Itm_status = 'Pending' OR auction_items.Itm_status = 'Fail') AND Item_userid = :uid";