Data Assist - Search Wizard - HELP!!
Please can anyone give me some help with the following difficulty I am having with the DataAssist Search Wizard ?
I have created a few simple database driven pages to test out some ideas but am only just learning about SQL and PHP. My database so far has 5 tables, which are based around a list of businesses that are categorised in various ways. I am trying to create a search page that uses DataAssist Search Wizard to filter the list by "Sub Category" (subCatID) and return the results in a separate results page.
So far I have followed a tutorial on the WebAssist site that shows how to do this, and I have successfully replicated this method on my own pages. The problem I am now having is that the tutorial uses only a SIMPLE recordset but I need to now use an ADVANCED recordset in order to pull in data from different tables. I have successfully created an advanced recordset that runs okay when tested, but when I try to use it with the DataAssist Search Wizard it gives the following error message on the results page...
Column 'subCatID' in where clause is ambiguous
The SQL code in my recordset is...
SELECT tags.tagID, tags.businessID, businesses.businessName, businesses.address, businesses.provinceID, provinces.province, businesses.town, businesses.mainCatID, tags.subCatID, subCats.subCat
FROM tags, businesses, provinces, subCats
WHERE tags.businessID = businesses.businessID AND businesses.provinceID = provinces.provinceID AND tags.subCatID = subCats.subCatID
ORDER BY tags.tagID
Also, the code in the simple recordset I have added to the search page (required for the dynamic list attached to the search tool) is...
WHERE mainCatID = 1
ORDER BY subCatID ASC
Would appreciate any help on this...