Hi -
I'm trying to do something similar in as much as I have created a custom form with three select lists CITY , CUISINE, PRICERANGE.
The select lists retrieve data from a table with let's say 300 rows.
What I Would like to do is as follows:
1, If the user doesn't select anything from the dropdowns and just clicks submit button the user will be shown the entire 300 rows from the table.
2. If the user selects from the CITY list only, he will get all rows from that match his CITY selection no matter the CUISINE or PRICERANGE.
3. The same goes for CUISINE and PRICERANGE in as much Italian as CUISINE he will get all rows that meet the Italian CUISINE regardless of what CITY or PRICERANGE.
4. If user were to select Italian from CUISINE and Under $15 from PRICERANGE rows that met this selection criteria regardless of what City.
When the user selects something in the form, only the data that he has chosen gets viewed in the table.
You can go to
palmsprings-mobile.com/index.php/portfolio/video-portfolio to get a better idea of my goals.
This is the query I am currently using but generates error 500:
SELECT
CompanyName, City, WEB
FROM sheet4
WHERE City = {$REQUEST:City}
AND
cuisine = {$REQUEST:cuisine}
AND
price = {$REQUEST:price}
I hope I have explained adequately what I am trying to accomplish.
Thanking you in advance for any support you may provide towards the resolution of this issue and I look forward to your response.