ADOQuery1- Close ADOQuery1- SQL- Clear ADOQuery1- SQL- Add SELECT FROM

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ADOQuery1->Close();
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add("SELECT * FROM staff WHERE `group` = 1");
ADOQuery1->Open();
int count = ADOQuery1->RecordCount;
ADOQuery1->Close();
if(count > 0)
{//Показываем окно авторизации
if(!is_login)
Form37->ShowModal();
}