Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Donation progress bar (http://www.bvlist.com/showthread.php?t=9656)

hatijahat 30th November 2013 20:26

Donation progress bar
 
hello to all who read this.
:sos: i need a little help with this mod, it's seem working on the page but when i update account to test seem the bar not moving at all..
how to make it working..? what sql i have to add in my database?
i'm a noob in sql and all these coding thing.. hope get a guide from a pro in here..


the image :
http://i.imgur.com/eLTeF16.png

the code:
Code:

//====donation progress bar by snuggles enjoy
$total_funds = sql_query("SELECT sum(cash) as USD FROM funds");
$arr_funds = mysql_fetch_array($total_funds);
$funds_so_far = $arr_funds["total_funds"];
$totalneeded = "264";    //=== set this to your monthly wanted amount
$funds_difference = $totalneeded - $funds_so_far;
$Progress_so_far = number_format($funds_so_far / $totalneeded * 100, 1);
if($Progress_so_far >= 100)
$Progress_so_far = "100";
echo"
$Progress_so_far%
";
//end
}


Jarsky 27th December 2013 23:02

Check you have any values in your SQL table for $total_funds

hatijahat 30th December 2013 04:45

Quote:

Originally Posted by Jarsky (Post 43548)
Check you have any values in your SQL table for $total_funds

i don't know how to add the SQL.. :wallbash:
can anyone make one? :sos:

KrackerMan 30th December 2013 09:15

Code:

    CREATE TABLE `funds` (
      `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
      `cash` DECIMAL(8,2) NOT NULL DEFAULT '0.00',
      `user` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `added` INT(11) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Quote:

ALTER TABLE users ADD `donoruntil` INT(11) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE users ADD `donated` DECIMAL(8,2) NOT NULL DEFAULT '0.00';
ALTER TABLE users ADD `total_donated` DECIMAL(8,2) NOT NULL DEFAULT '0.00';


All times are GMT +2. The time now is 21:37.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.