![]() |
|
|
#1 |
|
Архивный участник
Join Date: Dec 2005
Posts: 156
|
its just a raidboss lister (alive or not), everyone can code it, but since someone just showed some weird code on irc here it is:
it would need 1-2 extra str_replace, example: Amber -> Ember Code:
<?PHP
$conn = mssql_connect('localhost','omg','meng');
$db_selected = mssql_select_db('lin2world', $conn);
$result = mssql_query("SELECT npc_db_name,alive FROM npc_boss");
?>
<table width="500" cellpadding="0" cellspacing="0" border="1">
<?PHP
while ($rezult = mssql_fetch_object($result) )
{
$rezult->npc_db_name = ucwords(str_replace("_"," ",$rezult->npc_db_name));
$rezult->alive = str_replace("1","Alive",$rezult->alive);
$rezult->alive = str_replace("0","Not Alive",$rezult->alive);
echo ('<tr>
<td width="50%" height="20">'.$rezult->npc_db_name.'</td>
<td width="50%" height="20" align="center">'.$rezult->alive.'<br>
</tr>');
}
?>
</table>
|
|
|
|
|