Results 1 to 2 of 2

Thread: Remainder....

  1. #1
    Join Date
    Dec 1969

    Default Remainder....

    Hi,<BR><BR>I have a row being returned with the balance of tokens a particular person has left e.g. 10 after he/she performs a task. They are able to view the number of remaining tokens they have which is shown in the order of the date they performed the task. e.g. If I performed 1 task, I would taken 1 token less. However how can I keep deducting the balance from a previous search.<BR><BR>Example<BR><BR>No. of Tokens left for Trippy: 10<BR><BR>Searches<BR>Date Token Remaining Tokens<BR>6/21/02 - 1 9<BR>6/21/02 - 1 8<BR><BR>How do I keep deducting the number from the previous search e.g. i token from 9 hence 8 and so forth. The reason I am querying is that the only thing stored in the database is the number of tokens they have and the dates they performed the searches. Hopefully I&#039;m making sense.<BR><BR>Thanks<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Remainder....

    you could either add a field that tracks the current number of tokens buy subtracting from the total and then updating the database (recommended) or you can do a record count of how many searches they did and subtract that from the total number of tokens. The later is not suggested because I assume that they will "replenish" their token quantity in the future? in which case if you count their records then there is going to be more and more every time..and the count will not be accurate to use for a comparison.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts