Adding an array in a SQL query
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #15
RE: Adding an array in a SQL query
Don't use my_number_format when adding up values.  You need to keep it numerical - my_number_format converts numbers into textual format for display purposes.

So you'd have:

PHP Code:
            $total_downloads += $mdx['downloads'];
            $total_replies += $mdx['replies'];
            $total_views += $mdx['views'];

And run everything through my_number_format after the end of the loop.


My Blog
11-03-2010 10:11 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Adding an array in a SQL query - leefish - 11-02-2010, 04:58 AM
RE: Adding an array in a SQL query - RateU - 11-02-2010, 05:42 AM
RE: Adding an array in a SQL query - RateU - 11-02-2010, 07:02 AM
RE: Adding an array in a SQL query - techu - 11-02-2010, 12:16 PM
RE: Adding an array in a SQL query - RateU - 11-03-2010, 07:31 AM
RE: Adding an array in a SQL query - ZiNgA BuRgA - 11-03-2010 10:11 AM

 Standard Tools
Forum Jump: