Darkmatter5 Posted September 16, 2009 Share Posted September 16, 2009 I have 3 fields in a table called allo_hp, allo_mp and allo_mp and I'm wanting to add up the numbers in each of those fields and have that sumed result aliased out as total. How can I go about doing that? Link to comment https://forums.phpfreaks.com/topic/174499-sum-some-fields-in-a-select-query/ Share on other sites More sharing options...
gevans Posted September 16, 2009 Share Posted September 16, 2009 You can do the following; SELECT (`allo_hp` + `allo_mp` + `allo_theotherone`) as `total` FROM `your_table` Link to comment https://forums.phpfreaks.com/topic/174499-sum-some-fields-in-a-select-query/#findComment-919708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.