I want to sort with the WHERE function of a Query.
The only problem now is that I want the products to show all at first, and when you click sort that it sorts on page.
The Sort Query
$result=mysql_query("SELECT * FROM artikels WHERE
soort='".mysql_escape_string($_REQUEST['soort'])."'");
The Show all Query
$result=mysql_query("SELECT * FROM artikels WHERE soort='dahua' ");
Somehow I need to combine these 2 But When I Do this it stops working, and doesnt even sort. When I seperate the Sort or Show all Query it does work.
$result=mysql_query("SELECT * FROM artikels WHERE
soort-'dahua' AND soort='".mysql_escape_string($_REQUEST['soort'])."'");
I’d love it if someone helps me out with this because I’m now stuck on my project.
Many Thanks,
~Dave
To filter records from a table use
WHEREe.g.to filter records with multiple matches use
OReg.You sort the results using
ORDER BYe.g.You can add
DESCorASCfor direction