Adding an array in a SQL query
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #14
RE: Adding an array in a SQL query
And I am back Smile  I have found how to add up the columns in php, I used this in my query loop and added the variables into the templates:

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


but now I have a new problem. It seems that the numbers are too big for the fields. Its not the column width, I checked that, but if you look at the views total (on the screenshot I have marked it with a red box) then there is a problem - a problem that is not there with the comments.

(The grey bits are where I blocked users names for privacy and whatnot)

EDIT: I was typing so I missed RateUs post -  thanks RateU, and thanks to all for the congratulations etc - its great to have finally made something for myself, no matter how small Smile

And then I missed Zinga's too - yes, a setting is a good plan. I will look into that.



Attached File(s) Thumbnail(s)
   


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 11-03-2010 08:11 AM by leefish.)
11-03-2010 08:08 AM
Visit this user's website 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

 Standard Tools
Forum Jump: