procedure fullsearch(searchfor:string; searchin:Tcombobox; lblresults:tlabel; outputbox:tlistbox);begin outputbox.Enabled:=true; lblresults.Enabled:=true; //-- Search for accountnamnes if searchin.text=searchin.Items[0] then begin seequery('SELECT `acct`,login`amount` FROM `accounts`',form1.accdb.text); searchinqrtable(searchfor,lblresults,outputbox,2,0); end; //-- Search for account ids (acct) if searchin.text=searchin.Items[1] then begin seequery('SELECT `acct`,login`amount` FROM `accounts`',form1.accdb.text); //seequery('SET NAMES GBK',form1.chardb.text); searchinqrtable(searchfor,lblresults,outputbox,1,0); end; //-- Search for character names if searchin.text=searchin.Items[2] then begin //'SET NAMES ''GBK''' seequery('SELECT `acct`,`name` FROM `characters`;',form1.chardb.text); //seequery('SET NAMES GBK',form1.chardb.text); searchinqrtable(searchfor,lblresults,outputbox,2,1); end; //-- Search for character ids (guid) if searchin.text=searchin.items[3] then begin seequery('SELECT `acct`,`GUID` FROM `characters`;',form1.chardb.text); searchinqrtable(searchfor,lblresults,outputbox,2,1); end;end;procedure TForm2.resultsClick(Sender: TObject);//这个是Tlistboxvar temp:string; i:integer; lst:Tstrings; ex:Boolean;begin seequery('SELECT * FROM `accounts` WHERE`acct`='''+getsaccid(results)+''' ;',form1.accdb.text); E_login.Text:=qrtable.Cells[2,1]; E_password.Text:=qrtable.Cells[3,1]; E_cryptedpw:=qrtable.Cells[4,1]; E_lng.text:=qrtable.Cells[10,1]; seequery('SELECT * FROM `kingsys_points` WHERE `acct`='''+getsaccid(results)+''' ;',form1.accdb.text); edtacctpoints.Text:=qrtable.Cells[6,1]; edtacctviplevel.Text:=qrtable.Cells[7,1]; seequery('SELECT `guid`,`Name` FROM `characters` WHERE`acct`='''+getsaccid(results)+''' ;',form1.chardb.text); E_chars.Items.clear; for i:=1 to qrtable.rowcount-1 do begin E_chars.Items.Add('[guid]'+qrtable.Cells[1,i]+' - '+qrtable.Cells[2,i]); end; groupbox1.visible:=true;end;procedure TForm2.searchbtnClick(Sender: TObject);//这个是个TButtonbegin fullsearch(searchfor.Text,searchin,lblresults,results);end;这个是相关代码。请指教 帮忙看看 谢谢