I am trying to finish up a inventory script, but I have an obstacle in my way. I have a field where I can enter a quantity, but it does not update on the list (it how ever does show that the database is recieving the input as it shows in the field under that table). I figure the adding of the 'quantity' is correct just the showing/listing is wrong.
file xxx.xml --->
...
<query>SELECT sum(trans_inventory) FROM {TABLE} WHERE trans_product='{PRODUCT} </query>
<field>sum(trans_inventory)</field>
site_trans is the table where as trans_inventory is my field, this all works great! When I add to the quantity of an item through the transactions it updates it to the quantity field, BUT!, and alas the question!
The base quantity from which the originaly created item does not display nor does it get summed with the transaction field, so how do I get to work?
I thought of summing the two tables fields together to give the end result, but my coding knowledge is limited and I do not know the sysntax for it.
Any help would be nice and much apprieciated and if Im posting in the worng area, I applogize.
file xxx.xml --->
...
<query>SELECT sum(trans_inventory) FROM {TABLE} WHERE trans_product='{PRODUCT} </query>
<field>sum(trans_inventory)</field>
site_trans is the table where as trans_inventory is my field, this all works great! When I add to the quantity of an item through the transactions it updates it to the quantity field, BUT!, and alas the question!
The base quantity from which the originaly created item does not display nor does it get summed with the transaction field, so how do I get to work?
I thought of summing the two tables fields together to give the end result, but my coding knowledge is limited and I do not know the sysntax for it.
Any help would be nice and much apprieciated and if Im posting in the worng area, I applogize.