I want to make a credit system. If have user credits "warning: you have credit! quantity: [Jeton value in column]", If have not user credits "warning: you have not credit!" I used MyDAC Components
Jeton: User credit column.(In database)
How do I make it?
I tried to make
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;
If the
jeton
field is the credit, you can write something like this.