Ok, another problem, where do I put "where Category != 45" in this query:
PHP Code:
$sql = "select $tb_links.ID as site_id, $tb_links.SiteName as site_name, $tb_links.SiteURL as site_url, $tb_categories.Category as category_name, $tb_categories.ID as cat_id, $tb_links.Added as added, $tb_links.LastUpdate as last_update, $tb_links.Description as site_description, $tb_links.HitsIn as hits_in, $tb_links.HitsOut as hits_out, count($tb_reviews.ID) as total_reviews from $tb_links left join $tb_categories on $tb_links.Category=$tb_categories.ID left join $tb_reviews on $tb_links.ID=$tb_reviews.SiteID group by site_id order by ";
if($show == "new"){$sql .= "last_update "; $msg = "Bekijk ook de meest populaire links <a href=\"links.php?show=pop\">>></a>";}
if($show == "cool"){$sql .= "hits_in ";}
if($show == "pop"){$sql .= "hits_out "; $msg = "Bekijk ook de nieuwe links <a href=\"links.php?show=new\">>></a>";}
$sql .= "desc limit $sr, $pp";
Bookmarks