Clan ingame ranking

Results 1 to 16 of 16
  1. #1
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Clan ingame ranking

    Hey,

    i`ve created few weeks ago a thread like this one but i thought it is fixed but it isn`t.
    I still can`t find a solution already searched so i am posting this thread now.
    I am requesting the code to execute it for my database that i see ingame the clan rank.

    I would appreciate that if someone would post the code down below i have to execute at mssql.

    Thanks.


  2. #2
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Clan ingame ranking

    Try this, just written it.
    Code:
    <?php
    $con = mssql_connect("OMAR-PC\SQLEXPRESS", "sa", "mazemania1");
    mssql_select_db("GunzDB", $con);
    
    $q = mssql_query("SELECT CLID FROM Clan WHERE DeleteFlag != 1 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point DESC, Wins DESC, Losses ASC");
    $rank = 1;
    
    while($fetch = mssql_fetch_array($q))
    {
    	$q = mssql_query("UPDATE Clan SET Ranking = ".$rank." WHERE CLID = ".$fetch['CLID']."");
    	$rank++;
    }
    ?>

  3. #3
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by Vusion View Post
    Try this, just written it.
    Code:
    <?php
    $con = mssql_connect("OMAR-PC\SQLEXPRESS", "sa", "mazemania1");
    mssql_select_db("GunzDB", $con);
    
    $q = mssql_query("SELECT CLID FROM Clan WHERE DeleteFlag != 1 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point DESC, Wins DESC, Losses ASC");
    $rank = 1;
    
    while($fetch = mssql_fetch_array($q))
    {
    	$q = mssql_query("UPDATE Clan SET Ranking = ".$rank." WHERE CLID = ".$fetch['CLID']."");
    	$rank++;
    }
    ?>
    This is a php code o.o.
    Or can i just execute this one too :O?

  4. #4
    Account Upgraded | Title Enabled! ThunderZ is offline
    MemberRank
    Oct 2011 Join Date
    396Posts

    Re: Clan ingame ranking

    Quote Originally Posted by BG-Nero View Post
    This is a php code o.o.
    Or can i just execute this one too :O?
    yes..just execute it.

    he just gave you a script that will order by points,wins etc and will rank them by the top ones.

  5. #5
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by ThunderZ View Post
    yes..just execute it.

    he just gave you a script that will order by points,wins etc and will rank them by the top ones.
    But this is a php code and this code is trying to connect to the database but if you execute something you already got a connection to the db but i will try it and reply back.

    ---

    Edit : Executed in mssql but got ton of errors..
    Probally because this is php not a mssql query.

  6. #6
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Clan ingame ranking

    It's a php code, obviously.

  7. #7
    Die() Secured is offline
    MemberRank
    Sep 2011 Join Date
    /home/SDev/Location
    555Posts

    Re: Clan ingame ranking

    Quote Originally Posted by BG-Nero View Post
    But this is a php code and this code is trying to connect to the database but if you execute something you already got a connection to the db but i will try it and reply back.

    ---

    Edit : Executed in mssql but got ton of errors..
    Probally because this is php not a mssql query.
    are you looking for a query for for a script for a website?

    Code:
    SELECT CLID FROM Clan WHERE DeleteFlag != 1 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point DESC, Wins DESC, Losses ASC
    Because thats the query -_-

  8. #8
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by Secured View Post
    are you looking for a query for for a script for a website?

    Code:
    SELECT CLID FROM Clan WHERE DeleteFlag != 1 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point DESC, Wins DESC, Losses ASC
    Because thats the query -_-
    Yeah i meant a query for the database not a php script well on which table i have to execute this?

  9. #9
    Account Upgraded | Title Enabled! ThunderZ is offline
    MemberRank
    Oct 2011 Join Date
    396Posts

    Re: Clan ingame ranking

    Quote Originally Posted by BG-Nero View Post
    Yeah i meant a query for the database not a php script well on which table i have to execute this?
    it already selects the table..

    its ran from GunzDB database.

  10. #10
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by ThunderZ View Post
    it already selects the table..

    its ran from GunzDB database.
    Executed the query..
    Still i don“t see the rank of my ingame.
    I am using the 08 files.

  11. #11
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Clan ingame ranking

    Dear god, I'm looping a query which selects the best clans ordering them by point, wins, loses and inserting to it ranking 1, then increasing that rank and going on to the second best clan and adding ranking 2, and so on.

    Please, for the love of god, this is a PHP script.............

  12. #12
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by Vusion View Post
    Dear god, I'm looping a query which selects the best clans ordering them by point, wins, loses and inserting to it ranking 1, then increasing that rank and going on to the second best clan and adding ranking 2, and so on.

    Please, for the love of god, this is a PHP script.............
    I know that this is a PHP script i am in need of the query for the database not the PHP script and the query i`ve used of ThunderZ did nothing changed i even restarted the server

  13. #13
    Enthusiast Coldfx is offline
    MemberRank
    Oct 2011 Join Date
    29Posts

    Re: Clan ingame ranking


  14. #14
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Quote Originally Posted by Coldfx View Post
    Thank you will try it later and post back.

  15. #15
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Clan ingame ranking

    How hard is it to open a .php file and paste the code in it?

    then go to yourweb.com/the.phpfile.

  16. #16
    Account Upgraded | Title Enabled! BG-Nero is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    285Posts

    Re: Clan ingame ranking

    Because i dont want to use this extra pages.

    Btw the query worked thanks to both of you maybe i will be using later this php script but for now my rank ingame works!



Advertisement