Trying to use multiple WHERE statement values
Hi I have been away from programming for a while and I am having trouble getting a page to 'not display' if a field in the db is = 1.
Here is the code on the page that runs normally but displays either way , 1 or 0. The column name is DisplayOnPage.
$rsMain = new WA_MySQLi_RS("rsMain",$conn_mdb1,1);
$rsMain->setQuery("SELECT maintbl.*, DATE_FORMAT(maintbl.licenseDate, '%m/%d/%Y') AS date2, DATE_FORMAT(maintbl.lastMBCaction, '%m/%d/%Y') AS date3, DATE_FORMAT(maintbl.recordAddedOn, '%m/%d/%Y') AS date4, DATE_FORMAT(maintbl.recordModifiedOn, '%m/%d/%Y') AS date5, gendertbl.drgender, regiontbl.region, boardtbl.board FROM maintbl INNER JOIN gendertbl ON maintbl.genderID = gendertbl.genderID INNER JOIN regiontbl ON maintbl.regionID = regiontbl.regionID INNER JOIN boardtbl ON boardtbl.boardID = maintbl.boardID WHERE mainID = ? AND DisplayOnPage = 0");
$rsMain->bindParam("i", "".($_GET['mainID']) ."", "-1"); //colname
$rsMain->execute();
I just added the AND DisplayOnPage = 0" part today to try to make this work. It has been working without that code for a couple of years but displaying pages that should not be displayed.
Thank you.
Emma Morris