Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Complex MySQL? - is it possible?

Posted 28 Sep 2006 22:47:12
1
has voted
28 Sep 2006 22:47:12 rob hewitt posted:
I have a page that lets users choose from a dropdown list of towns and also choose from a dropdown list of dance styles.

For each drop down list there is an 'All' option where they would select everything (town and/or style)

The output from the form would look like this -
page.php?Town=London?Style=Ballet if one option is chosen from each list, or
page.php?Town=All?Style=Ballet if the user selected all from the town list.

Q? is it possible for the MySQL query to identify if 'All' has been selected and make the query - select * from venues where style = 'XYZ' instead of select * from venues where town='ABC' and style = 'XYZ'

I tried experimenting with the MySQL IF statement but couldnt get anything to work.
I'm using DMX 8.02.
Thanks

Reply to this topic