If your table has the fields (for example)
myBooks
ISBN
Title
Copies
Borrowed
You can get a list of the number of available copies of all books by
SELECT Title, Copies-Borrowed AS Available FROM myBooks
If a book gets borrowed and you need to update the table you can do
UPDATE myBooks SET Borrowed=Borrowed+1 WHERE ISBN='some value'
And if a book is returned change "+" to "-"
Reverend Jim
Carpe per diem
3,623 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
That's why you are asked to share your code in the rules.
how do i subtract and add values to each fields for every single transaction on the same table?
When you are saying transaction, can you define transaction? Share the code for it?
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
how do i subtract and add values to each fields for every single transaction on the same table
That is very ambiguous question which I tried to answer. Are you saying you want to modify each field (doesn't make sense but that's what you said)?
Where do i exaclty put the Select Title?
After line 117.
Reverend Jim
Carpe per diem
3,623 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
Question Answered as of 4 Months Ago by
Reverend Jim
and
adam_k