adding values of database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
zplits
Forum Contributor
Posts: 158
Joined: Sun Aug 03, 2008 8:59 pm

adding values of database

Post by zplits »

Hi there, does anyone know how to add values that is stored in the database?

for example. I have a table in my database named tbl_add....and below are the fields
name qty
garlic 13
onion 10


what will be the code if i want to add the values of qty? and save it into another table?
like for instance, 13 + 10 = 23. 23 will be stored in another table....

Is this thing possible? if so, please help me. Thanks a lot.
Post Reply