I am trying to add together several different vales for a row that are spread across multiple columns.
The columns of my table are;
product_id, product_name, product_stock_lab, product_stock_storeroom, product_stock_garage.
The ID is unique, the name is the product name, product_stock_XXX contains a numerical value of current stock.
Each product could be stored in multiple locations so I would like to add these together to output a total in PHP for a simple stock management solution.
So far, I’ve not been able to find a way to do it other than in SQL which is not useful for me to display inside a PHP page.
Any help would be greatly appreciated.