Cyrix Posted April 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
-1 Frost Diver Posted September 15, 2019 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? Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted April 2, 2013 Share Posted April 2, 2013 that a mix of guild woe script and mysql. Quote Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
chatterboy Posted April 2, 2013 Share Posted April 2, 2013 its like this one <img src="<?php echo $this->emblem($guilds[$i]->guild_id) ?>" /> Quote Link to comment Share on other sites More sharing options...
Hyvraine Posted April 2, 2013 Share Posted April 2, 2013 more like <img src="<?php echo $this->emblem($i) ?>" /> since the code was basically for foreach -- Quote Link to comment Share on other sites More sharing options...
Cyrix Posted April 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
Cyrix Posted April 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
xairox Posted October 22, 2013 Share Posted October 22, 2013 as I can do with it, only showing the top guild emblem Number 1?? Quote Link to comment Share on other sites More sharing options...
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