Jump to content
php.lv forumi

Top 5


Llama

Recommended Posts

Es veletos kip lai no charekter topa izvelk 5 labakos pec lvl un parada to man weba ! Kads nevar uztaisiti tadu scriptu!

 

 

Ps. Var jau ari no mysql nolasiti ! Jo man serveris stav uz mysql ;)

Edited by Llama
Link to comment
Share on other sites

$res = "SELECT * FROM charters ORDER by lvl LIMIT 5";
$sql=mysql_query($res);

while($row = mysql_fetch_array($sql))
{
echo "".$row['charter_name']." ".$row['charter_lvl']."<br />";
 }

 

Būtu jadarbojas perfekti :)

Edited by goma smile
Link to comment
Share on other sites

  • 3 weeks later...
$res = "SELECT * FROM charters ORDER by lvl LIMIT 5";
$sql=mysql_query($res);

while($row = mysql_fetch_array($sql))
{
echo "".$row['charter_name']." ".$row['charter_lvl']."<br />";
 }

 

Būtu jadarbojas perfekti :)

 

Tie ir sliktākie :D

Ja nemaldos, augšā jau rakstīja par labākajiem 5iem!

DESC LIMIT 5 nevis LIMIT 5 :)

 

$sql = mysql_query("SELECT * FROM tabula ORDER by lvl DESC LIMIT 5");

while($data = mysql_fetch_aray($sql))

{

echo ''.$data['niks'].' ar '.$data['lvl'].'';

}

Respektīvi šis izvelk tavus 5us labākos :D ja neproti to izmantot tad ver vaļā maku un samaksā kādam lai uztaisa tev :D

ammm.... man darbojas 99,9 + 0,1% ;)

Edited by Kemito
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...