Plätze in DB speichern

03/16/2011 10:39 socressor#1
Hallo Liebe Com,

habe mal wieder eine kleine Frage...diesmal in Richtung PHP.

Unzwar nutze ich das Ranking script von Hennik.

PHP Code:
<center><table style="color:#fff;" border="0">
    <
tr>
        <
th width="150">Platz</th>
        <
th width="150">Name</th>
        <
th width="150">Level</th>
        <
th width="150">Exp</th>
        <
th width="150">Reich</th>
    </
tr>
</
table></center>

    echo 
"<center><table style='color:#fff;' border=\"0\">"// Open table
    
$i $get;
    
            while(
$array mysql_fetch_array($query)) {
                
$i $i 1;
                
                    
                echo 
"
                <tr>
                <th width=\"150\"><font color=\"white\">" 
$i "</font></th>
                <th width=\"150\"><font color=\"white\"><a href=\"index.php?page=player&char="
,$array["name"],"\">",$array["name"],"</a></font></th>
                <th width=\"150\"><font color=\"white\">" 
$array["level"] . "</font></th>
                <th width=\"150\"><font color=\"white\">" 
$array["exp"] . "</font></th>";
                
                    


                
$reich "SELECT empire from player_index where id = " $array[account_id] . "";
                    
$query2 mysql_query($reich);
                    
$array2 mysql_fetch_array($query2);
                    
                
                if(
$array2["empire"] == 1) {
                echo 
"<th width=\"150\"><img src=\"images/icons/shinsoo.jpg\"></th></tr>";
                } elseif(
$array2["empire"] == 2) {
                echo 
"<th width=\"150\"><img src=\"images/icons/chunjo.jpg\"></th></tr>";
                } else {
                echo 
"<th width=\"150\"><img src=\"images/icons/jinno.png\"></th></tr>";
                }
                }
    echo 
"</table></center><br>"// close table 
Meine Fragen un wie kann ich die Ränge/Plätze nun in die DB speichern da sie hier ja nur lokal angezeigt werden. Möchte sie in eine neue angelegte Spalte in der Player DB speichern.

vielen dank im vorraus =)
03/16/2011 13:27 cocojambo49#2
Quote:
Originally Posted by socressor View Post
Hallo Liebe Com,

habe mal wieder eine kleine Frage...diesmal in Richtung PHP.

Unzwar nutze ich das Ranking script von Hennik.

PHP Code:
<center><table style="color:#fff;" border="0">
    <
tr>
        <
th width="150">Platz</th>
        <
th width="150">Name</th>
        <
th width="150">Level</th>
        <
th width="150">Exp</th>
        <
th width="150">Reich</th>
    </
tr>
</
table></center>

    echo 
"<center><table style='color:#fff;' border=\"0\">"// Open table
    
$i $get;
    
            while(
$array mysql_fetch_array($query)) {
                
$i $i 1;
                
                    
                echo 
"
                <tr>
                <th width=\"150\"><font color=\"white\">" 
$i "</font></th>
                <th width=\"150\"><font color=\"white\"><a href=\"index.php?page=player&char="
,$array["name"],"\">",$array["name"],"</a></font></th>
                <th width=\"150\"><font color=\"white\">" 
$array["level"] . "</font></th>
                <th width=\"150\"><font color=\"white\">" 
$array["exp"] . "</font></th>";
                
                    


                
$reich "SELECT empire from player_index where id = " $array[account_id] . "";
                    
$query2 mysql_query($reich);
                    
$array2 mysql_fetch_array($query2);
                    
                
                if(
$array2["empire"] == 1) {
                echo 
"<th width=\"150\"><img src=\"images/icons/shinsoo.jpg\"></th></tr>";
                } elseif(
$array2["empire"] == 2) {
                echo 
"<th width=\"150\"><img src=\"images/icons/chunjo.jpg\"></th></tr>";
                } else {
                echo 
"<th width=\"150\"><img src=\"images/icons/jinno.png\"></th></tr>";
                }
                }
    echo 
"</table></center><br>"// close table 
Meine Fragen un wie kann ich die Ränge/Plätze nun in die DB speichern da sie hier ja nur lokal angezeigt werden. Möchte sie in eine neue angelegte Spalte in der Player DB speichern.

vielen dank im vorraus =)

hab kp :D aber please kann jemand hier die Lösung schreiben...warte auch auf sowas =)
03/16/2011 14:32 NotEnoughForYou#3
wieso wills du sie speichern? sie werden doch aus der db ausgelesen ... für was also nochmal speichenr ?
03/16/2011 14:41 socressor#4
Sie werde lokal dargestellt
PHP Code:
$rank "SELECT * from player WHERE name NOT LIKE '[GM]%'AND name NOT LIKE 'ADMIN'   AND name NOT LIKE '[TM]%'  AND name NOT LIKE 'BlackKristal'  AND name NOT LIKE '[SGM]%'  AND name NOT LIKE '[GA]%' AND name NOT LIKE '[SGA]%' AND name NOT LIKE '[SA]%'  AND name NOT LIKE '[MoD]%'  AND name NOT LIKE '[SSA]%'  AND name NOT LIKE '[TGM]%' order by level desc, exp desc, name asc limit $get,20";

$i $get;
    
            while(
$array mysql_fetch_array($query)) {
                
$i $i 1
da quasi..
03/16/2011 15:47 socressor#5
kann geschlossen werden..habs..
03/16/2011 18:22 Crank#6
#closed