close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Trying to use multiple WHERE statement values

Thread began 9/10/2020 3:37 pm by EmmaMorris | Last modified 9/11/2020 7:17 am by EmmaMorris | 15 views | 2 replies

EmmaMorris

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

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...