Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10

Thread: Help...

  1. #1
    Join Date
    Jul 2006
    Location
    Leeds
    Posts
    17,006
    Tokens
    26,134
    Habbo
    e5

    Latest Awards:

    Default Help...

    Well basically on our sporting website, I am looking to add a thing on the front page where it shows someones name and how many goals they've scored...

    I've seen them before... an example I want is like this: http://www.brhc.co.uk/ - On their front page they have a "top scorers" thing... I am looking to see if I could have one of these created for me so I could put it on our website?

    We have 4 teams at our club, and i'd like one for each team...

    Anyone that could create one.. i'm hoping they're simple? would be fantastic.

    Thanks.

  2. #2
    Join Date
    Nov 2008
    Location
    UK
    Posts
    173
    Tokens
    0
    Habbo
    coolchris322

    Latest Awards:

    Default

    easy system, just create a table, with 4 rows, set the table to have 2 columns, team name and score.

    then just add the scores into that, and do the query "select * from `tbl_name` sort desc by score" and then just do mysql_fetch_array for that, and it will just order it out simple as.

  3. #3
    Join Date
    Jul 2006
    Location
    Leeds
    Posts
    17,006
    Tokens
    26,134
    Habbo
    e5

    Latest Awards:

    Default

    do i do all that coding stuff on the site?

  4. #4
    Join Date
    Nov 2008
    Location
    UK
    Posts
    173
    Tokens
    0
    Habbo
    coolchris322

    Latest Awards:

    Default

    Yeh.

    If you dont know how to do that, just pm me ingame, and im shure i could sort something out.

  5. #5
    Join Date
    Jul 2006
    Location
    Leeds
    Posts
    17,006
    Tokens
    26,134
    Habbo
    e5

    Latest Awards:

    Default

    Cheers for your help mate. +rep.

  6. #6
    Join Date
    Nov 2008
    Location
    UK
    Posts
    173
    Tokens
    0
    Habbo
    coolchris322

    Latest Awards:

    Default

    gimi 2 mins, ill just post sql and php code

    ---------- Post added 23-01-2011 at 08:14 PM ----------

    sql : just run this in your sql and it will create the tables needed
    Code:
    CREATE TABLE IF NOT EXISTS `scores`(
                    `team` text NOT NULL,
                    `score` text NOT NULL
                    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ;

  7. #7
    Join Date
    Jul 2006
    Location
    Leeds
    Posts
    17,006
    Tokens
    26,134
    Habbo
    e5

    Latest Awards:

    Default

    Cheers for all your help

  8. #8
    Join Date
    Nov 2008
    Location
    UK
    Posts
    173
    Tokens
    0
    Habbo
    coolchris322

    Latest Awards:

    Default

    The php source:
    Code:
    <?
    $host = "localhost";
    $username = "USER";
    $password = "PASS";
    $database = "DATABASEl";
    mysql_connect("$host", "$username", "$password")or die("cannot connect server");
    mysql_select_db("$database")or die("cannot select DB");
    $sql = mysql_query("SELECT * from `scores`");
    echo "<table><tr><td>Team</td><td>Score</td><tr>"
    while($r = mysql_fetch_array($sql)) {
         echo "<tr><td>."$r['team']."</td><td>".$r['score']; 
    }
    ?>
    ---------- Post added 23-01-2011 at 08:20 PM ----------

    should echo all the teams within the database for each row, echo the team name and their score.

    just go into the db and edit their scores, or build a script that updates it.

  9. #9
    Join Date
    Jul 2006
    Location
    Leeds
    Posts
    17,006
    Tokens
    26,134
    Habbo
    e5

    Latest Awards:

    Default

    Is there a place where I could test this but not on the website?

  10. #10
    Join Date
    Nov 2008
    Location
    UK
    Posts
    173
    Tokens
    0
    Habbo
    coolchris322

    Latest Awards:

    Default

    just create a php page on the website and dont give anyone the link - should make it a kind of private testing place.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •