Re: Need help building mysql query
NEED HELP!!!
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 QUERRY 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 QUERRY 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 QUERRY 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 QUERRY IS NOT WORKING
}
Subject
Written By
Posted
Re: Need help building mysql query
August 31, 2012 07:45PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.