SirChick Posted August 26, 2007 Share Posted August 26, 2007 Ok im trying to work out how to do something along the lines of this: Theres a table with say: item name / user id / quantity now say theres like 7 of these rows in the database. What i want to do is firslty, count how many rows there are and then add up quantity of each of the 7 rows together to equal a total using the userid in a session... is that possible? Link to comment https://forums.phpfreaks.com/topic/66751-solved-adding-up-all-the-values-found-in-one-field/ Share on other sites More sharing options...
AndyB Posted August 26, 2007 Share Posted August 26, 2007 count() sum() www.tizag.com for examples. The manual for details Link to comment https://forums.phpfreaks.com/topic/66751-solved-adding-up-all-the-values-found-in-one-field/#findComment-334501 Share on other sites More sharing options...
SirChick Posted August 26, 2007 Author Share Posted August 26, 2007 thankyou andy! Link to comment https://forums.phpfreaks.com/topic/66751-solved-adding-up-all-the-values-found-in-one-field/#findComment-334503 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.