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

database search dynamic menu

Thread began 5/14/2010 2:41 pm by basim | Last modified 7/20/2010 10:04 am by basim | 1854 views | 11 replies


That would be the SQL for your main recordset if you have relational tables. And the one that will be searched by the dropdowns and return products or items based on the filter.

What do you have for tables now?

If your main product table's recordset looks something like this;
FROM tblFoods

which is just super basic, but you get the idea.
Then it's returning everything "*" from the table called "tblFoods". But if this table has no reference to what brand or class it's in, then the search has no way of returning just those records. So you create a JOIN that relates all the tables involved into a joined recordset.

In the example SQL, it basically says;

SELECT * (Return all records)

FROM tblFoods (from the tblFoods table)

LEFT JOIN relFoods_Brands ON tblFoods.ID = relFoods_Brands.Parent_ID (join into this recordset the "relational" table called "relFoods_Brands" where the "ID" of the first table "tblFoods" matches the "Parent_ID" column of the "relFoods_Brands" table)

LEFT JOIN tblBrands ON tblFoods.BrandID = tblBrands.BrandsID (also join into this recordset the table called "tblBrands" where the "BrandID" column of the first table "tblFoods" matches the "BrandID" of the "tblBrands" table column)

LEFT JOIN tblClass ON relFoods_Brands.Parent_ClassID = tblClass.ClassID (finally, join into this recordset the table called "tblClass" where the "ClassID" column of the table "tblClass" matches the "Parent_ClassID" column of the relational table "relFoods_Brands)

I might have missed something, but I think this is correct. Don't get discouraged if it looks confusing. I still get very confused when writing these and I click the "Test" button a lot until I narrow it down to what I am shooting for.


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