全部博文(788)
分类:
2009-02-11 16:54:28
s1:='select username from userload where rights=1 and username='+''''+edit1.Text+'''';
s1:='select username from userload where username='''+edit1.Text+''' and rights=1';?
很奇怪哦.那如果rights同样也是一个从外界如edit2获取的值该怎样加呢!?
to risman,这个法不对~
if rights=1 then
begin
s1:='select username from userload where username='+''''+edit1.Text+'''';
datamodule2.Query3.SQL.Add(s1);
datamodule2.Query3.Open;
end;
s1:='select username from userload where username='+quotedstr(edit1.text)+' and rights='+ edit2.text;//如果rights是文本值(字串),那么,把edit2.text换成quotedstr(edit2.text)
上面是针对你继续问的“那如果rights同样也是一个从外界如edit2获取的值该怎样加呢!?”的回答