$category = get_option('category');
// checks to see if subcategory is enabled in the option page
if ( get_option('enable_subcategory') == 'y' ):
$subcategory = get_option('subcategory');
endif;
$qry = mysql_query("SELECT car,number FROM ".$table."
WHERE category = '$category' AND subcategory = '$subcategory'
ORDER BY RAND() LIMIT 20");
How can i write the $qry so the " AND subcategory = '$subcategory' " will disappear if subcategory option isn't enable?