Thread: [PI]Martin autodonation fix

Results 1 to 3 of 3
  1. #1 [PI]Martin autodonation fix 
    Donator
    Ed17's Avatar
    Join Date
    Jun 2011
    Posts
    296
    Thanks given
    42
    Thanks received
    14
    Rep Power
    10
    How can i fix the query, it's not writing the info in the database after i receive the payments, thanks.

    This is the last part of the code where u make the query:
    if($p->ipn_data["mc_gross"] > 0 && strcmp ($p->ipn_data["business"],$EMAIL) == 0) {
    $user = $p->ipn_data["custom"];
    $date = $p->ipn_data["payment_date"];
    $prodid = $p->ipn_data["item_number"];
    $amount = $p->ipn_data["mc_gross"];
    $amountTickets = 1;

    $user = str_replace("-", "_", $user);
    $user = str_replace(" ", "_", $user);
    $user = mysql_real_escape_string($user);
    mysql_query("INSERT INTO donation (username, time, productid, price, tickets) VALUES ('" . $user . "', '" . $date . "', '" . $prodid . "', " . $amount . ", " . $amountTickets . ");");
    // $fh = fopen(".ipnerr", "a");
    // fwrite($fh, mysql_error());
    // fclose($fh);
    }
    Reply With Quote  
     

  2. #2  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Code:
    mysql_query("INSERT INTO `donation` (`username`, `time`, `productid`, `price`, `tickets`) VALUES ('" . $user . "', '" . $date . "', '" . $prodid . "', '" . $amount . "', '" . $amountTickets . "');");
    missing ' ' from last two values!
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator
    Ed17's Avatar
    Join Date
    Jun 2011
    Posts
    296
    Thanks given
    42
    Thanks received
    14
    Rep Power
    10
    huh, ohh thanks, hope it works now
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Paying $15 for Autodonation
    By Genesis in forum Buying
    Replies: 1
    Last Post: 05-27-2011, 09:44 PM
  2. Paying $15 for Autodonation
    By Genesis in forum Requests
    Replies: 4
    Last Post: 05-27-2011, 03:03 AM
  3. AutoDonation + Highscores [REQ][PAY]
    By Russ in forum Requests
    Replies: 7
    Last Post: 04-27-2011, 03:49 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •