Cyrix Posted April 2, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Share Posted April 2, 2013 Hi, how can i get guild emblem, from Database and show in index page like this: http://gatheringro.ch/ thx. Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 133 Reputation: 15 Joined: 12/23/11 Last Seen: December 20, 2023 Share Posted April 2, 2013 (edited) pretty sure it's supposed to be like this: <table> <?php // Connect to database server mysql_connect("127.0.0.1", "ragnarok", "ragnarok") or die (mysql_error ()); // Select database mysql_select_db("ragnarok") or die(mysql_error()); // SQL query $strSQL = "SELECT * from `guild` where `emblem_data` IS NOT NULL"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); // Loop the recordset $rs while($row = mysql_fetch_array($rs)) { echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo '<td><img src="'.$this->emblem($row['emblem_id']).'"</td>'; echo "</tr>"; } mysql_close(); ?> </table> haven't tried it tho Edited April 2, 2013 by kenshn111 1 Link to comment Share on other sites More sharing options...
-1 Frost Diver Posted September 15, 2019 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 189 Reputation: 7 Joined: 10/22/18 Last Seen: 18 hours ago Share Posted September 15, 2019 On 4/2/2013 at 9:22 PM, Hyvraine said: pretty sure it's supposed to be like this: haven't tried it tho Where to put this codes? Link to comment Share on other sites More sharing options...
mrlongshen Posted April 2, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted April 2, 2013 that a mix of guild woe script and mysql. Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 133 Reputation: 15 Joined: 12/23/11 Last Seen: December 20, 2023 Share Posted April 2, 2013 <img src="<?php echo $this->emblem($guild->guild_id) ?> $guild->guild_id would be obviously the ID of the guild you want to show Link to comment Share on other sites More sharing options...
chatterboy Posted April 2, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 309 Reputation: 26 Joined: 11/26/12 Last Seen: November 22, 2024 Share Posted April 2, 2013 its like this one <img src="<?php echo $this->emblem($guilds[$i]->guild_id) ?>" /> Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 133 Reputation: 15 Joined: 12/23/11 Last Seen: December 20, 2023 Share Posted April 2, 2013 more like <img src="<?php echo $this->emblem($i) ?>" /> since the code was basically for foreach -- Link to comment Share on other sites More sharing options...
Cyrix Posted April 2, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Author Share Posted April 2, 2013 (edited) im using: <table> <tr> <td></td> <td><img src="<?php echo $this->emblem($guild->guild_id)$idemb ?>"</td> </center> </tr> <?php // Connect to database server mysql_connect("127.0.0.1", "ragnarok", "ragnarok") or die (mysql_error ()); // Select database mysql_select_db("ragnarok") or die(mysql_error()); // SQL query $strSQL = "SELECT * from `guild` where `emblem_data` IS NOT NULL"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); $idemb=$row['emblem_id'] // Loop the recordset $rs while($row = mysql_fetch_array($rs)) { echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo "<td></td>"; echo "</tr>"; } echo "</table>"; mysql_close(); ?> but url image = 127.0.0.1/?module=guild&action=emblem&login=FluxRO&charmap=FluxRO&id= Edited April 2, 2013 by Cyrix Link to comment Share on other sites More sharing options...
Cyrix Posted April 2, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Author Share Posted April 2, 2013 (edited) pretty sure it's supposed to be like this: <table> <?php // Connect to database server mysql_connect("127.0.0.1", "ragnarok", "ragnarok") or die (mysql_error ()); // Select database mysql_select_db("ragnarok") or die(mysql_error()); // SQL query $strSQL = "SELECT * from `guild` where `emblem_data` IS NOT NULL"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); // Loop the recordset $rs while($row = mysql_fetch_array($rs)) { echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo '<td><img src="'.$this->emblem($row['emblem_id']).'"</td>'; echo "</tr>"; } mysql_close(); ?> </table> haven't tried it tho Thank you... Works fine... (+1) Solved. Edited April 2, 2013 by Cyrix Link to comment Share on other sites More sharing options...
xairox Posted October 22, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 2 Reputation: 0 Joined: 10/29/12 Last Seen: November 28, 2013 Share Posted October 22, 2013 as I can do with it, only showing the top guild emblem Number 1?? Link to comment Share on other sites More sharing options...
Question
Cyrix
Hi,
how can i get guild emblem, from Database and show in index page like this: http://gatheringro.ch/
thx.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts