PHP+MYSQL+HTML question...
#2

You had some errors in there, anyways I am not a professional php coder, but I have knowledge about php, the code below should work.

pawn Код:
<?php  
    include('../konekcija.php');  //include.
    $proveripari = mysql_query("SELECT pProfil, pCash FROM Igraci ORDER BY pCash DESC LIMIT 10;"); //selects, pProfil, pCash and order pCash them by 10.
    if( mysql_num_rows($proveripari) > 0) //if the row is more than 0, if no accounts registered the row will print none.
    {//opening bracket 1
        while ($row = mysql_fetch_array($proveripari))  
        {//opening bracket 2
            echo"{$row['pProfil']}"; //shows the pProfil of the player
            echo"{$row['pCash']}"; //shows the pCash of the player
        }//closing bracket 1
    }//closing bracket 2
?>
Reply


Messages In This Thread
PHP+MYSQL+HTML question... - by NeroX98 - 20.12.2013, 19:13
Re: PHP+MYSQL+HTML question... - by Patrick - 20.12.2013, 19:31
Re: PHP+MYSQL+HTML question... - by NeroX98 - 20.12.2013, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)