Jump to content
  • 0

Guild Emblem - Flux CP


Cyrix

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  133
  • Reputation:   14
  • Joined:  12/23/11
  • Last Seen:  

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 by kenshn111
  • Upvote 1
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  177
  • Reputation:   6
  • Joined:  10/22/18
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

that a mix of guild woe script and mysql.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  133
  • Reputation:   14
  • Joined:  12/23/11
  • Last Seen:  

<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


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

its like this one  <img src="<?php echo $this->emblem($guilds[$i]->guild_id) ?>" />

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  133
  • Reputation:   14
  • Joined:  12/23/11
  • Last Seen:  

more like <img src="<?php echo $this->emblem($i) ?>" />

 

since the code was basically for foreach

 

--

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

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 by Cyrix
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

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 by Cyrix
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  10/29/12
  • Last Seen:  

as I can do with it, only showing the top guild emblem Number 1??

Link to comment
Share on other sites

×
×
  • Create New...