I have a MySQL database with a table called 'poster' with multple columns of course but there are 2 in particular that I am going to discuss. 1 is called 'code' wish is the item code actually used for what items are displayed and the other 'category' which is self explaintory. Now what I wish to do is ultimately display a specific category and it's sorted by the item 'code'. when it is selected from a side menu in a different fram.
So in order to display it I tried this query.
$show=$_GET['show_cat']
$sql = "SELECT * FROM `poster` WHEN 'category==$show_cat' ORDER BY 'code' ASC";
$poster_results = mysql_query($sql) or die ("Could not do, what you ask of me, sorry man. Check your Code!");
while ($posters_row = mysql_fetch_array($poster_results))
{
extract($posters_row);
//EXTRA CODE TO DISPLAY//
}
As expect by me, it didn't work. Anyone have any input?