Getting total quantities

From: Date: Mon, 15 Feb 2010 04:55:11 +0000
Subject: Getting total quantities
Groups: php.db 
Request: Send a blank email to php-db+get-46887@lists.php.net to get a copy of this message
Hello List, I have a situation where I want to figure out the total number of products in my database. I want to read all the fields $ProductStock and add them together to get the TOTAL number of products, not just the number of rows in my database. Any pointers on the code to use for adding multiple rows field values? EG: Say I have three individual products and Product one has 10 and Product 2 has 20 and Product three has 5, and these values are set in the field $ProductStock, I want to get the result of 35 and not 3. Any help is appreciated. TIA Karl DeSaulniers Design Drumm http://designdrumm.com

« previous php.db (#46887) next »