PHP mass credits

Results 1 to 9 of 9
  1. #1
    Newbie sorrow101 is offline
    MemberRank
    Jul 2010 Join Date
    11Posts

    PHP mass credits

    how can i give everyone in the users table 5,000 coins as a mysql query?

    i run phpretro


  2. #2
    Banned computert231 is offline
    BannedRank
    Jun 2010 Join Date
    245Posts

    talk Re: PHP mass credits

    Quote Originally Posted by sorrow101 View Post
    how can i give everyone in the users table 5,000 coins as a mysql query?
    There is a command for it

  3. #3
    Newbie sorrow101 is offline
    MemberRank
    Jul 2010 Join Date
    11Posts

    Re: PHP mass credits

    not a commmand, a query

  4. #4
    Grand Master Sledmore is offline
    Grand MasterRank
    Jun 2009 Join Date
    1,133Posts

    Re: PHP mass credits

    I know what you mean, but i'm not sure, copy from Uber, also, wrong section.

    -Offtopic: 400 POSTS!

  5. #5
    Ultra Light Beam Makarov is offline
    Grand MasterRank
    Apr 2010 Join Date
    GothamLocation
    3,620Posts

    Re: PHP mass credits

    This is in the wrong section bud..
    And i don't know..

  6. #6
    Newbie Jan212 is offline
    MemberRank
    Aug 2010 Join Date
    1Posts

    Re: PHP mass credits

    I think you just save this:
    UPDATE users SET credits = '5000'
    in a text file, then go to localhost/phpmyadmin and go to your database, go to users, click import and choose that text file. Done!?!

  7. #7
    Sorcerer Supreme TheJacob is offline
    Member +Rank
    Jun 2010 Join Date
    Toronto, CanadaLocation
    322Posts

    Re: PHP mass credits

    Go to your database, click "SQL Query" or "Query". Type the thing below (fill in the blanks appropriately);

    Code:
    UPDATE <account table> SET <credits column> = '<amount>'

  8. #8
    BFH Experience Loader Mininova is offline
    Grand MasterRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: PHP mass credits

    Example (in me.php):

    PHP Code:
    $date date("m.d.y");

    $sqlcode mysql_query("SELECT username FROM user_credits WHERE time = '".$date."' AND username = '".$myrow["username"]."'");
    $codu mysql_fetch_array($sqlcode);

    if(
    $codu 1){
    mysql_query("UPDATE users SET credits = credits + 3000 WHERE id = '".$myrow['id']."' LIMIT 1") or die(mysql_error());

    $sql "INSERT INTO user_credits (username,time) VALUES ('".$myrow["nickname"]."','".$date."');";

    mysql_query($sql) or die(mysql_error());


    Credits by Me :)


    Edit: with this Code it Update it automatic :)
    Last edited by Mininova; 20-08-10 at 08:22 PM.

  9. #9
    sexiess is a sin. Subway is offline
    Grand MasterRank
    Jun 2010 Join Date
    2,491Posts

    Re: PHP mass credits

    thanks for this Jacob!



Advertisement