Warehouse PHP

Results 1 to 4 of 4
  1. #1
    Member avihai195 is offline
    MemberRank
    Aug 2012 Join Date
    Ashqelon, IsraeLocation
    52Posts

    Warehouse PHP

    Hi all :)

    i want to see the Warehouse but when i try this:
    PHP Code:
    $username=$_SESSION['username'];
    $query "Select Items From warehouse Where AccountID='$username'";
    $result mssql_query($query);
    $row mssql_fetch_array($result);
    echo 
    $row['Items']; 
    i get this:
    PHP Code:
    ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 
    How can i get normal result?


  2. #2
    Am i? ScriptKid is offline
    MemberRank
    Oct 2006 Join Date
    $Location="??";Location
    1,810Posts

    Re: Warehouse PHP

    open on different program. try notepad ++ or wordpad or notepad only

  3. #3
    Member avihai195 is offline
    MemberRank
    Aug 2012 Join Date
    Ashqelon, IsraeLocation
    52Posts

    Re: Warehouse PHP

    Solution:
    PHP Code:
    $z=0;
    for (
    $x=1$x<31$x++) 
    {
    for (
    $m=1$m<9$m++) 
    {
    $query "Select substring(Items,($z*16)+1,16) From warehouse Where AccountID='$username'";
    $result mssql_query($query);
    $row mssql_fetch_array($result);
    echo 
    bin2hex($row[0]);
    echo 
    "<br>";
    $z++;
    }


  4. #4
    Member cryy is offline
    MemberRank
    Jan 2011 Join Date
    HomeLocation
    80Posts

    Re: Warehouse PHP

    PHP Code:
    $item_size 16;
    $slots 240// 120 - for no expanded warehouse
    $account 'test';
    $query mssql_query('SELECT CONVERT(TEXT, CONVERT(VARCHAR('.($item_size*$slots).'), Items)) AS Items FROM Warehouse WHERE AccountId = \''.$account.'\'');
    if(
    mssql_num_rows($query)){
        
    $arr mssql_fetch_array($query);
        echo 
    strtoupper(bin2hex($arr['Items']));
    }
    else{
        echo 
    'Warehouse not created.';




Advertisement