2010. szeptember 3., péntek

if( ($key == "description" ||
$key == "country" ||
$key == "city" ||
$key == "sex" ||
$key == "composition") && $value != ""){
//ha már volt, akkor növeljük
if(count($db->selectInObject('seo', 'id', 'search_content = "'.$value.'"')) > 0){
$db->q('update seo set search_res_num = search_res_num+1 where search_content = "'.$value.'"');
}else{
//ha még nem volt akkor a találatok számával indítjuk
$db->q("insert into seo (search_content, search_res_num) VALUES('".$value."', ".count($result).")");
}
}