$kontrolet = $db -> prepare("SELECT * FROM 'tablo' WHERE kim='ugur' and kimi='nurettin' AND (Select Count(*) from 'tablo' where kim='nurettin' and kimi='ugur')>0");
$kontrolet -> execute();
$kontrol = $kontrolet -> rowCount();
if($kontrol >0){
echo "var";
}else{
echo "yok";
}