【发布时间】:2012-08-05 18:19:20
【问题描述】:
我想做一个信用系统。如果有用户信用“警告:你有信用!数量:[列中的杰顿值]”,如果没有用户信用“警告:你没有信用!”我使用了 MyDAC 组件
杰顿:用户信用列。(在数据库中)
我是怎么做到的?
我试着做
MyQuery1.Close;
MyQuery1.SQL.Text :=' select* from uyeler '+
'where nick=:0 and jeton=:1';
MyQuery1.Params[0].AsString:=Edit1.Text;
MyQuery1.Params[1].AsString:=?must?;
MyQuery1.open;
If MyQuery1.RecordCount=0 Then
Begin
MessageDlg('warning: you have not credit!', mtWarning,[mbOK],0)
End
Else
Begin
MessageDlg('warning: you have credit! quantity: (Jeton value in column)', mtWarning,[mbOK],0)
End;
【问题讨论】: