close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

MySQLi Database Search

Thread began 3/09/2016 2:35 pm by markdoyle87077 | Last modified 6/10/2016 4:15 pm by markdoyle87077 | 470 views | 20 replies

Ray BorduinWebAssist

The products recordset would be something like:

php:
<?php

$rs_products 
= new WA_MySQLi_RS("rs_products",$dmbc_database,0);
$rs_products->setQuery("SELECT * FROM products WHERE visible =1 AND category = ? ORDER BY type, description ASC");
$rs_products->bindParam("s""".(isset($_GET['categories'])?$_GET['categories']:"")  ."""-1"); //colname
$rs_products->execute();
?>



The type recordset would be something like:

php:
<?php

$rs_type 
= new WA_MySQLi_RS("rs_type",$dmbc_database,0);
$rs_type->setQuery("SELECT DISTINCT typename, type FROM products WHERE visible =1 AND category = ? ORDER BY type ASC");
$rs_type->bindParam("s""".(isset($_GET['categories'])?$_GET['categories']:"")  ."""-1"); //colname
$rs_type->execute();
?>



You can update the ATC recordset to:

php:
<?php

$rs_ATC 
= new WA_MySQLi_RS("rs_ATC",$dmbc_database,0);
$rs_ATC->setQuery("SELECT * FROM products WHERE id IN (?)");
$rs_ATC->bindParam("il""".(isset($_POST['ATCCheck'])?implode(",",$_POST['ATCCheck']):"")  ."""-1"); //colname
$rs_ATC->execute();
?>



I'm just guessing the category field in your products table is named category and that is the field that the url parameter would match up with. If not, let me know. It would be easier in a screen sharing session because I could ask you about your database structure and verify it works by testing the page. If you do have issues, perhaps you could fill me in more about the database structure and give me FTP access and a URL so I can debug and test the code changes I'm suggesting.

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