Handling database calculations with a php page

From: Date: Sun, 13 Mar 2005 11:30:24 +0000
Subject: Handling database calculations with a php page
Groups: php.db 
Request: Send a blank email to php-db+get-38880@lists.php.net to get a copy of this message
Hello, 3 tables hold money value but they are inputed into the database without the dollar symbol (without $). So the value could be 3.00 etc... I want to calculate by adding (+) them together. A username is in each table. So only the username matching in each table must calculate. So if in table 1 username Chris has 3.00 and in table 2 Chris has 5.00 we need to add the two together. If you value equals 0 or NULL or blank it should either a) ignore it or b) add it as a zero. What is the best PHP code to use for this inside a PHP code? Thanks! Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com

« previous php.db (#38880) next »