• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Php problem

gremlee

Qumora.com
Joined
Jul 15, 2008
Messages
511
Reaction score
16
Hello having some problem its not finding the guild winning in the database :S using znote aac

http://qumora.com//winners.php

here is the script

PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

<?php

function winners ()
{
    return mysql_select_multi("SELECT * FROM `guildwinner` WHERE id=1 ");
}

$guilds = winners();
?>
    <div class="inner">
        <center>
        <h1><b>Guild War Event Winners</b></h1>
            <img width="100" src="http://us.123rf.com/400wm/400/400/argus456/argus4560809/argus456080900686/3525049-gold-medal-with-winner-written-on-it.jpg"/>
            <br>
            Congratulations to <?php echo $guilds['guild_name']; ?> Has won the <a href="events.php" >Guild War Event</a>  this week!<br>
            Everyone in the team has been rewarded with <b><font color="red">10 premium points!</font></b>
        </center>
    </div>
<?php include 'layout/overall/footer.php'; ?>
 
I made a simple adjustment that should work, if you want something better inform all fields of guildwinner table, and the way the system works (it updates the existing record?, it inserts new records?, it deletes the old records?)

** This mode will show all records from the table guildwinner



PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

    <div class="inner">
        <center>
        <h1><b>Guild War Event Winners</b></h1>
            <img width="100" src="http://us.123rf.com/400wm/400/400/argus456/argus4560809/argus456080900686/3525049-gold-medal-with-winner-written-on-it.jpg"/>
            <br>
            <?php $sql = mysql_query("SELECT * FROM `guildwinner`");  // here you will need to put a filter.... EX: WHERE winner = 1; // 1 = true
                    while($rows = mysql_fetch_array($sql)) {
                        echo '<p>Congratulations to '.$rows['guild_name'].'</p><br>';
                    } ?>
            Has won the <a href="events.php" >Guild War Event</a>  this week!<br>
            Everyone in the team has been rewarded with <b><font color="red">10 premium points!</font></b>
        </center>
    </div>

<?php include 'layout/overall/footer.php'; ?>
 
I made a simple adjustment that should work, if you want something better inform all fields of guildwinner table, and the way the system works (it updates the existing record?, it inserts new records?, it deletes the old records?)

** This mode will show all records from the table guildwinner



PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

    <div class="inner">
        <center>
        <h1><b>Guild War Event Winners</b></h1>
            <img width="100" src="http://us.123rf.com/400wm/400/400/argus456/argus4560809/argus456080900686/3525049-gold-medal-with-winner-written-on-it.jpg"/>
            <br>
            <?php $sql = mysql_query("SELECT * FROM `guildwinner`");  // here you will need to put a filter.... EX: WHERE winner = 1; // 1 = true
                    while($rows = mysql_fetch_array($sql)) {
                        echo '<p>Congratulations to '.$rows['guild_name'].'</p><br>';
                    } ?>
            Has won the <a href="events.php" >Guild War Event</a>  this week!<br>
            Everyone in the team has been rewarded with <b><font color="red">10 premium points!</font></b>
        </center>
    </div>

<?php include 'layout/overall/footer.php'; ?>

Looks nice but i would like something like this http://hellsway.net/?subtopic=winners
and only the weeks winners not all :D
 
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

    <div class="inner">
        <center>
        <h1><b>Guild War Event Winners</b></h1>
            <img width="100" src="http://us.123rf.com/400wm/400/400/argus456/argus4560809/argus456080900686/3525049-gold-medal-with-winner-written-on-it.jpg"/>
            <br />
            <?php $sql = mysql_query("SELECT * FROM `guildwinner` ORDER BY id DESC LIMIT 1 ");
                    while($rows = mysql_fetch_array($sql)) {
                        echo '<p>Congratulations to '.$rows['guild_name'].'</p><br>';
                    } ?>
            Has won the <a href="events.php" >Guild War Event</a>  this week!<br>
            Everyone in the team has been rewarded with <b><font color="red">10 premium points!</font></b>
        </center>
    </div>

<?php include 'layout/overall/footer.php'; ?>

If you read what he wrote you could have done that. xD
 
Back
Top