session_start();

if ($_SESSION['sorgu_calisti_mi'] != 'evet') {
   // Sorgunuzu yapın
   $_SESSION['sorgu_calisti_mi'] = 'evet';
}