Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml: Summing two fields from two different tables??

Status
Not open for further replies.

iLLiE

Technical User
Aug 3, 2005
2
US
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.
 
delete this thread no one here could help, thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top