Ir para conteúdo
Faça parte da equipe! (2024) ×
Conheça nossa Beta Zone! Novas áreas a caminho! ×
  • Quem está por aqui   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
  • 0

ajuda pffff!


andre2005
 Compartilhar

Pergunta

tenho um site gesor quanto clico em last news olha oq fala

 

 

Erro fatal : "PDOException" excepção Uncaught com a mensagem "SQLSTATE [42S22]: Column not found: 1054 Unknown column 'z_forum.icon_id' em '''lista de campos em C: \ xampp \ htdocs latestnews.php \: 276 Stack trace: # 0 C: \ xampp \ htdocs \ latestnews.php (276): PDO-> query ('SELECT `z_forum ...') # 1 C: \ xampp \ htdocs \ index.php (64): include (' C : \ xampp \ htdocs ...') # 2 {main} jogado em C: \ xampp \ htdocs latestnews.php \ na linha 276

 

e tipo minha last como q ta

 

<?PHP

$time = time();

date_default_timezone_set ('America/Sao_Paulo');

 

/////////////////////////////////////////////////////////////////////////////////////////

//The new edition of my script: Best Player, Last joined and something new Server Motd.//

/////////////////////////Everything in the new appearance.///////////////////////////////

//////////////////////////////////////by Aleh///////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////

///Queries ///

$query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();

$query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();

$housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();

$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `lastwarning`>1;')->fetch();

$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();

$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();

$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();

$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();

///End Queries ///

 

$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>

<tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>

<tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>

 

<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Server motd:</b> '.$query['text'].'</center></td></tr>

<table border=0 cellpadding=0 cellspacing=1 width=100%>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>

<td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>

<td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>

<td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

 

</table></td></tr></table>';

 

///Don't delete this! Please respect my work! I am counting on reputation.

$main_content .= '<div align="right"><small><b></b></small></div><br />';

///Don't delete this! Please respect my work! I am counting on reputation.

div>';';

 

//######################## SHOW TICKERS AND NEWS #######################

$time = time();

$main_content .= '<div class="NewsHeadline">

<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">

<table border="0">

<tr>

<td style="text-align: center; font-weight: bold;">

<font color="white">Most powerfull guilds</font>

</td>

</tr>

</table>

</div>

</div>

<table border="0" cellspacing="3" cellpadding="4" width="100%">

<tr>';

 

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,

`g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`

FROM `killers` k

LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`

LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`

LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`

LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`

WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1

GROUP BY `name`

ORDER BY `frags` DESC, `name` ASC

LIMIT 0, 6;') as $guild)

$main_content .= ' <td style="width: 25%; text-align: center;">

<a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills

</td>';

 

$main_content .= ' </tr>

</table>';

if ($logged){

$players_from_account = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();

foreach($players_from_account as $player)

{

$str .= '<option value="'.$player['id'].'"';

if($player['id'] == $char_id)

$strt .= ' selected="selected"';

$str .= '>'.$player['name'].'</option>';

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Este tópico está impedido de receber novos posts.
 Compartilhar

×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.