[ODBC]Last game made script

Results 1 to 6 of 6
  1. #1
    Valued Member iCreamPie is offline
    MemberRank
    Sep 2010 Join Date
    130Posts

    [ODBC]Last game made script

    Hello citizens,

    I'm Rodi :: I'm releasing this script because alot people are having problems with MSSQL, and im working more on PHP these day's if you want some tutorials or something about PHP you can alway's message me.

    From now on i will be on IcreamPIE or something...

    live Previeuw : Test page


    Example :
    Our last game has started on 2010-10-22 12:37:23.907 gametype: Quest
    map: Mansion gamename: ^3 Ignorance with 1 of gameplay.
    There were 1 players in the gameroom called: iLoveSam .
    Connection :

    Code:
    <?php
    //Database Connection
    	$dns="GunzDB";
    	$user="sa";
    	$pass="password";
    	$connect=odbc_connect($dns, $user, $pass) or die ("Couldn't connect to the database, we're sorry...");
    	odbc_exec($connect,"use GunzDB");
    ?>
    Code:
    <?php
    include('config.php');
    ?>
    
    <body bgcolor="#faf">
    <?php
    //get latest games
    $query = odbc_exec($connect, "SELECT * FROM GameLog WHERE StartTime = (SELECT MAX(StartTime) FROM GameLog)");
    odbc_fetch_row($query);
    $id = odbc_result($query, 1);
    $gamename = odbc_result($query, 2);
    $map = odbc_result($query, 4);
    $type = odbc_result($query, 5);
    $rounds = odbc_result($query, 6);
    $start = odbc_result($query, 7);
    $count = odbc_result($query, 8);
    $players = odbc_result($query, 9);
    
    //writing the results to the screen
    echo "Our last game has started on ".$start." gametype: ".$type."
    <br />map: ".$map." gamename: ".$gamename." with ".$rounds." of gameplay.
    <br />There were ".$count." players in the gameroom called: ".$players.".";
    ?>
    
    
    </body>


  2. #2
    Doggie And Rice. Military is offline
    MemberRank
    Jun 2009 Join Date
    Here and AboutLocation
    3,302Posts

    Re: [ODBC]Last game made script

    Thank you for the next contribution.

  3. #3
    I am THE DON Joe9099 is offline
    MemberRank
    Jan 2007 Join Date
    England, UkLocation
    3,655Posts

    Re: [ODBC]Last game made script

    Lol, i will actually use some of these scripts even though there very simple... Gathering information from the database and displaying it, but heh good stuff rodi, many accounts ur using huh

  4. #4
    Account Upgraded | Title Enabled! adminjoker is offline
    MemberRank
    Jun 2009 Join Date
    USA - Stuart -Location
    247Posts

    Re: [ODBC]Last game made script

    Thank you so much for the sharing!

  5. #5
    Valued Member iCreamPie is offline
    MemberRank
    Sep 2010 Join Date
    130Posts

    Re: [ODBC]Last game made script

    Quote Originally Posted by Joe9099 View Post
    Lol, i will actually use some of these scripts even though there very simple... Gathering information from the database and displaying it, but heh good stuff rodi, many accounts ur using huh
    about 30 if that much ?XD

  6. #6
    Valued Member Millitary8 is offline
    MemberRank
    Oct 2010 Join Date
    C++Location
    141Posts

    Re: [ODBC]Last game made script

    Nice ODBC Release :)



Advertisement