I get a mysql error at *)PHP Code:$to = mysql_fetch_object(mysql_query("SELECT SUM(*) as total FROM $forumzDB.unz_browser WHERE brid = '1'")) or die(mysql_error());
| SitePoint Sponsor |


I get a mysql error at *)PHP Code:$to = mysql_fetch_object(mysql_query("SELECT SUM(*) as total FROM $forumzDB.unz_browser WHERE brid = '1'")) or die(mysql_error());

because * is not a vaild parameter for sum(). what are you trying to do?


brid | brow | brow1 | brow2 | brow3
1 ------2-------55-------2--------77
I want to sum the brid 1 row!


Gah, no easier way? Theres 13 of them


why are there 13 of them? what happens when a new "brow" is required?Originally Posted by azz0r_wugg
sounds like they should be rows, not columns


Indeed, I recoded my graph and redid the table
browser no desc
MAXTHON 0 Maxthon
OPERA 0 Opera
MSIE 2 Internet Explorer
NETSCAPE 2 Netscape
FIREFOX 0 Firefox
SAFARI 0 Safari
KONQUEROR 0 Konqueror
MOZILLA 0 Mozilla
OTHER 3 Unknown


so now you can use SUM() comfortabley, yes?


Indeed, thanks!
Bookmarks