$query = @mysql_query("SELECT * FROM animals WHERE colour = '$colour' AND specie = '$specie' ORDER by id DESC");
The variables $colour and $specie comes from the user when he/she is searching through the database. The problem is if the user wants all the animals to be listed and chooses the variables $colour and $specie to be empty.
How do I make the query select it all if the variables are empty? I do not want to make an if(empty($colour)) statement as I plan to add more variables and it'll get complicated.
Cheers,
Undrium