close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to use hidden features to do advanced search prior to DataBridge being MySQLi ready

Thread began 3/09/2017 6:12 am by markdoyle87077 | Last modified 3/09/2017 2:08 pm by Ray Borduin | 141 views | 0 replies |

markdoyle87077

This will help lots of you - How to use hidden features to do advanced search prior to DataBridge being MySQLi ready

Got this information from a Premier support call with Ray and I am making this available as I know it will help others. I am sure most of you can follow this but if not make sure a POST is done to the page using form field keyword_search. I have included a recordset and a the search code for the recordset. The search code is searching the database fields products.itemnumber", "products.supplieritemnumber", "products.description", "products.german_description", "products.supplier

Make sure your rsobj.php file is at least version 2.18 or above as I have tested on this.

php:
<?php if(!empty($_POST['keyword_search'])) {

$keywords htmlentities(trim($_POST['keyword_search']));
$_SESSION['keywords'] = $keywords;
?>

<?php
$searchrs_products_WADbSearch1 
= new WA_MySQLi_Search("rs_products","");
if (isset(
$_SESSION["keywords"])) {
    
$searchrs_products_WADbSearch1->clearSearch();
    
$searchrs_products_WADbSearch1->setSearch(array("type"=>"k""comparison"=>"like""join"=>"and""and"=>" ""or"=>", ""end_encap"=>"'""start_encap"=>"'"),array("products.itemnumber""products.supplieritemnumber""products.description""products.german_description""products.supplier"),"c",$_SESSION["keywords"]);
}
?>

<?php
$rs_products 
= new WA_MySQLi_RS("rs_products",$dmbc_database,50);
$rs_products->setQuery("SELECT products.itemnumber, products.description, products.visible, products.selling_quantity, products.price, products.stock, products.packed, products.pending_online_orders, special_prices.price AS special_price FROM products LEFT OUTER JOIN special_prices ON products.itemnumber = special_prices.itemnumber AND special_prices.userdetails_id = ? WHERE visible = 1 ORDER BY description ASC");
$rs_products->bindParam("i""".($rs_customer->getColumnVal("id"))  ."""-1"); //colname
$rs_products->execute();
?>
Sign in to reply to this post

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