View Single Post
  #2 (permalink)  
Old 07-27-04, 04:38 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
try:
PHP Code:

$query2 "SELECT ccode, category_name, phone, address, city, state, category from category_details, category, city, state where state.id = category_details.fk_state and city.id = category_details.fk_city and category.id = category_details.fk_categoryand and city = '{$_GET['city']}'";

isset(
$_GET['category']) ? $query2 .= "and category = '{$_GET['category']}'"
hope it helps
Wille
Reply With Quote