[HELP] Donation Information Script menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Blackboy0's Avatar Member
    Reputation
    70
    Join Date
    Nov 2007
    Posts
    377
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] Donation Information Script

    Here's the Script I have right now:
    Code:
    <?php
    // CREDITS //
    // Blackboy0 for Script //
    // 0x0f7afc68 for Total Cash $sql //
    
    $host = "host";  //db host
    $user = "username";       // username
    $pass = "password";       // password
    $don_data = "donordb";  // donator db
    $port = 3036;  //port
    
    $conn = mysql_connect($host, $user, $pass) or die(mysql_error());
    mysql_select_db($don_data, $conn) or die(mysql_error());
    
    $sql = "SELECT COUNT(*) FROM log WHERE entry BETWEEN '1' AND '150'";
    $sqlquery = mysql_query($sql) or die(mysql_error());
    $don = mysql_result($sqlquery,0,0);
    
    $sql = "SELECT SUM(amount) FROM log";
    $sqlquery = mysql_query($sql) or die(mysql_error());
    $amount = mysql_result($sqlquery,0,0);
    
    echo "Donations: " . $don . "<br>\n";
    echo "Total Cash: $" . $amount . "<br>\n";
    
    mysql_close($conn);
    ?>
    So that shows all Donations and the Total Cash that has been brought in in a simple Format of "____ : ______".

    Alright, I wanna do this:

    The goal is $15.00, alright? So I want it to update whenever we get a Donation, to say $__.__. So, I was thinking that it like do the SUM thing from before, but then Subtract it from 15.00. I've just started doing this kinda stuff with MySQL PHP, so I dunno all the Commands <_< It'd be great if somebody could help me

    [HELP] Donation Information Script
  2. #2
    Blackboy0's Avatar Member
    Reputation
    70
    Join Date
    Nov 2007
    Posts
    377
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alrighty... I guess not alot of people view the PHP Forums then?

Similar Threads

  1. [ArcEmu] Help on a script. Donation/Vote Script
    By Found in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 04-08-2011, 05:50 AM
  2. [Help] Auto Fight Script
    By Sirect in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 02-05-2008, 10:26 AM
  3. [Help] I need help creating a script.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 23
    Last Post: 01-10-2008, 10:06 PM
  4. [HELP] A few scripts for FreeBSD
    By samtron in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 01-09-2008, 09:47 PM
  5. [HELP]Donating
    By C.C. in forum Community Chat
    Replies: 2
    Last Post: 01-09-2008, 07:01 PM
All times are GMT -5. The time now is 02:41 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search