Hi all,
Problem:
I have a drop down list with a number of options including one option that says ALL, which obvoiusly means the ALL the records.
The problem is that if a user selects just a single value then no sweat, the SQL query is simple however if the user selects ALL i can't say:
$query = "select * from SomeTable where SomeValue=ALL
But then again i don't want to have to write seperate queries for every possibility (there are many drop lists with ALL). I want to use a wildcard. I have tried % as follows
Say the variable returned form the drop list is "Value"
if ($Value=="ALL")
{
$Value='%'; (tried "%" as well)
}
$query = "select * from SomeTable where SomeValue=$Value";
but to no avail. Any help (really) appreciated
Kind Regards
Feather