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

Building a Dynamic Where Clause

Thread began 8/13/2010 10:47 am by dnys04173367569 | Last modified 8/23/2010 11:30 am by dnys04173367569 | 860 views | 3 replies


I have corrected this and have a $price_query variable that should change when a filter button is pressed.

However, any changes to the $price_query is not happening.

I believe that the orginal whereClause gets set, when the page initially loads and that will include what is initially held in the $price_query variable, but when the page is refreshed by an update to the price filter the where clause is not getting updated with the change.

$WADbSearch1->whereClause .= $price_query . "ProductID IN (SELECT ProductID FROM productoccasions WHERE (OccasionID = ".implode($_GET["ProductOccasionID"]," OR OccasionID = ")."))";

Is there anyway I can force the whereClause to update and accept the change of the $price_query variable.

The variable is to be selected by a dropdown box once the page is loaded and then the customer can selected to show items based on a number of price options eg. $10 to $50 or $50 to $100.

I have tested the filter to check that $price_query does change when the filter button is selected by echoing the varaible within the same page, however the whereClause is not changeing based on the change to the variable, which leads me to believe that the whereClause is not being updated with the refresh of the page.

Any help would be greatly appreciated.

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





Ease of use


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...