前三个查询工作正常,但最后一个不是。第二个查询可以正常工作,$status !== ''
但最后一个$status !== ''
查询没有执行查询,任何人都可以帮助我
if (isset($_POST['go'])) {
$status = $_POST[status];
if ($status == 4){
$status = '' ;
}
if ($topic == 100 && $subtopic == '' && $status == '' ) {
$queryString = "select * from tblquiz where userid='$_SESSION[numericuserid]' LIMIT $start, $limit" ;
$countString = "select * from tblquiz where userid='$_SESSION[numericuserid]'";
} // NOTE : THIS QUERY IS WORKING PERFECT
elseif ($topic !== '' && $subtopic !== '' && $status !== '' ) {
$queryString = "select * from tblquiz where qstatus=$status AND qtopic='$topic[topicname]' AND subtopic='$_POST[subtopic]' AND userid='$_SESSION[numericuserid]' LIMIT $start, $limit" ;
$countString = "select * from tblquiz where qstatus=$status AND qtopic='$topic[topicname]' AND subtopic='$_POST[subtopic]' AND userid='$_SESSION[numericuserid]'";
} // NOTE : THIS QUERY IS WORKING PERFECT
elseif ($topic !== '' && $subtopic !== '' && $status == '' ) {
$queryString = "select * from tblquiz where qtopic='$topic[topicname]' AND subtopic='$_POST[subtopic]' AND userid='$_SESSION[numericuserid]' LIMIT $start, $limit" ;
$countString = "select * from tblquiz where qtopic='$topic[topicname]' AND subtopic='$_POST[subtopic]' AND userid='$_SESSION[numericuserid]'";
} // NOTE : THIS QUERY IS WORKING PERFECT
elseif ($topic == 100 && $subtopic == '' && $status !== '') {
$queryString = "select * from tblquiz where qstatus= $status AND userid='$_SESSION[numericuserid]' LIMIT $start, $limit" ;
$countString = "select * from tblquiz where qstatus= $status AND userid='$_SESSION[numericuserid]' ";
} **// NOTE : THIS QUERY IS NOT WORKING**
}