Insert/Update Individual Fields in DB Table
So maybe I have some lofty desires, but I ma trying to come up with a way to change only 1 record (field) within a table.
SCENARIO: I want to have one table that has the columns "cid", "class_name" and "open_seats"..So, say you have one row with values:
'1, namemw520, 25' then a second,
'2, nametr520, 32' and a third,
etc...
Then in a form when the person registers and chooses a class, upon submittal, it will subtract one from the open_seats column and only affect the row of the class_name chosen.
WHAT I'VE TRIED:
So far, the only thing I can think of is to have multiple queries to multiple one row tables, but then updating a form based on a dropdown selection doesn't seem to work, besides, there are like 30 classes, and I do not want to create 30 DB tables, if it can be avoided. Or am I WAY over my head on this one?
Any help would be much appreciated.
TIA
