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

How To Create a MultiTable search?

Thread began 5/31/2012 6:24 pm by Peterson Design Studio - jefferis | Last modified 6/04/2012 5:08 pm by Peterson Design Studio - jefferis | 1771 views | 31 replies

Dave BuchholzBeta Tester


It can be done but not within the extension interface, it is pretty easy if you are comfortable in code view (which I am sure you are) to add new search items to the code block and then join the 2 respective tables in the query as you would normally.

A couple of gotcha's if you have fields that are named the same in both tables you need to explicitly call them i.e. tbl_name.field rather than just field and you cannot use aliases in the search code block.

This is an example of how the code block would look in one of my admin sections

$WADbSearch1 = new FilterDef;

  //keyword array declarations
  $KeyArr0 = array("");
  $KeyArr1 = array("tbl_clients.fname", "tbl_clients.lname", "tbl_orders.shipfname", "tbl_orders.shiplname");
  $KeyArr2 = array("tbl_orderdetails.title");
  $KeyArr3 = array("tbl_orderdetails.details");
  $KeyArr4 = array("");
  $KeyArr5 = array("tbl_orderdetails.title");
  $KeyArr6 = array("tbl_orderdetails.title");  
  $KeyArr7 = array("tbl_clients.fname", "tbl_clients.lname");
  $KeyArr8 = array("");

  //comparison list additions
  $WADbSearch1->keywordComparison($KeyArr0,"".((isset($_GET["zoom_query"]))?$_GET["zoom_query"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr1,"".((isset($_GET["zoom_query"]))?$_GET["zoom_query"]:"")  ."","OR","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr2,"".((isset($_GET["zoom_query"]))?$_GET["zoom_query"]:"")  ."","OR","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr3,"".((isset($_GET["zoom_query"]))?$_GET["zoom_query"]:"")  ."","OR","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr4,"".((isset($_GET["S_title"]))?$_GET["S_title"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr5,"".((isset($_GET["S_sku"]))?$_GET["S_sku"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr6,"".((isset($_GET["S_product"]))?$_GET["S_product"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr7,"".((isset($_GET["S_fname"]))?$_GET["S_fname"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  $WADbSearch1->keywordComparison($KeyArr8,"".((isset($_GET["S_email"]))?$_GET["S_email"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);

The zoom_query call is a single multi table search text box

Hope that helps.

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