How does PHP design, for example, a total number of tasks + remaining places, which are all passed to the front end for display?

is that two values are displayed at the front end, one is the total number of places, and the other is the number of remaining names. For example, a task has a total of 50 places, after the user receives, the total number of times after collection shows the remaining quota, how to achieve this. I feel that the database needs two fields to show these two numbers, but how to relate them, and how to judge that they need to be subtracted? Which boss helps me? this problem has perplexed me for a long time. I don"t know how to achieve it. You"d better have the code to help present it. Thank you very much!

Php
May.16,2021

A task id, has two fields: the total quota and the used quota. The total quota remains the same. With the increase of the used quota, you can


just open a field in the task table to record the number of people who have applied, or the remaining number. Bring it out each time, and you can maintain this field after someone applies.

associate with task id, get one minus one

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b407fc-2c510.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b407fc-2c510.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?