Jump to content
php.lv forumi

Recommended Posts

Posted (edited)

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
Posted

Llama, ja esi gatavs maksāt, tad noteikti kāds uztaisīs.

Ja nevēlies maksāt tad prasi padomus nevis pašu kodu.

 

izmanto select un while

 

select character from table order by lvl desc limit 5

Posted

besi ara..

 

1. Kas ir charakters ?

2. Kas ir lvl - limenis ?

3. par ko vispar ir runa ?

4. kur tu glaba datus ?

5. ja turi sql`a tad izmanto kodu ko dod anoniims.

Posted (edited)

$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
  • 3 weeks later...
Posted (edited)
$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

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...