Ir para conteúdo

Featured Replies

Postado

Não sei se eu tenho que criar alguma table, ou o quê.. não acho a solução em lugar nenhum

 

( ! ) Fatal error: Call to a member function fetchAll() on a non-object in C:\wamp\www\layouts\tibiacom\layout.php on line 13
Call Stack
# Time Memory Function Location
1 0.0010 136912 {main}( ) ..\index.php:0
2 0.2660 625400 include_once( 'C:\wamp\www\system\load.layout.php' ) ..\index.php:43
3 0.2670 707376 include( 'C:\wamp\www\layouts\tibiacom\layout.php' ) ..\load.layout.php:42

 

 

A linha 13 completa: 

players_online_data = $SQL->query('SELECT ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('flag') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('vocation') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('level') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('skull') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looktype') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookaddons') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookhead') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookbody') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looklegs') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookfeet') . ' FROM ' . $SQL->tableName('accounts') . ', ' . $SQL->tableName('players') . ', ' . $SQL->tableName('players_online') . ' WHERE ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('players_online') . '.' . $SQL->fieldName('player_id') . ' AND ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('players') . '.' . $SQL->fieldName('account_id') . ' ORDER BY ' . $SQL->fieldName($orderby))->fetchAll();

 

Editado por Maykkkin666
Editei por ter formulado a pergunta errada (veja o histórico de edições)

  • Respostas 8
  • Visualizações 512
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Cria a coluna  flag  na tabela accounts e o problema será resolvido.

  • Roda esse comando na database    CREATE TABLE IF NOT EXISTS `z_news_tickers` ( `date` int(11) NOT NULL default '1', `author` int(11) NOT NULL, `image_id` int(3) NOT NULL default '0', `text` t

Postado
10 horas atrás, Maykkkin666 disse:

Não sei se eu tenho que criar alguma table, ou o quê.. não acho a solução em lugar nenhum

 

( ! ) Fatal error: Call to a member function fetchAll() on a non-object in C:\wamp\www\layouts\tibiacom\layout.php on line 13
Call Stack
# Time Memory Function Location
1 0.0010 136912 {main}( ) ..\index.php:0
2 0.2660 625400 include_once( 'C:\wamp\www\system\load.layout.php' ) ..\index.php:43
3 0.2670 707376 include( 'C:\wamp\www\layouts\tibiacom\layout.php' ) ..\load.layout.php:42

 

 

A linha 13 completa: 


players_online_data = $SQL->query('SELECT ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('flag') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('vocation') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('level') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('skull') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looktype') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookaddons') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookhead') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookbody') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looklegs') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookfeet') . ' FROM ' . $SQL->tableName('accounts') . ', ' . $SQL->tableName('players') . ', ' . $SQL->tableName('players_online') . ' WHERE ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('players_online') . '.' . $SQL->fieldName('player_id') . ' AND ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('players') . '.' . $SQL->fieldName('account_id') . ' ORDER BY ' . $SQL->fieldName($orderby))->fetchAll();

 

 

 

 

 

Olá amigo, teria como você postar (ou anexar) o seu index.php (pasta www/index.php) e o seu layout.php (pasta www/layouts/tibiacom/layout.php), obrigado, fico no aguardo, vlws!

mOw9OYy.png

[Designer] / [Developer] 

 

Postado

Esse erro retornou por que a query falhou.

 

 

No seu index.php que você passou tem.

 

define('DEBUG_DATABASE', false);

Coloque

define('DEBUG_DATABASE', true);

 

E ele vai mostrar se for alguma tabela faltando etc.

Depois de ter trocado atualize o site e veja qual o "Novo Erro".

Postado
  • Autor

Apareceu isso:

 

 

 

Query: SELECT `accounts`.`flag`, `players`.`name`, `players`.`vocation`, `players`.`level`, `players`.`skull`, `players`.`looktype`, `players`.`lookaddons`, `players`.`lookhead`, `players`.`lookbody`, `players`.`looklegs`, `players`.`lookfeet` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY `name`
SQLSTATE: 42S22
Driver code: 1054
Error message: Champ 'accounts.flag' inconnu dans field list

 

( ! ) Fatal error: Call to a member function fetchAll() on a non-object in C:\wamp\www\layouts\tibiacom\layout.php on line 13
Call Stack
# Time Memory Function Location
1 0.0010 136096 {main}( ) ..\index.php:0
2 0.0550 628448 include_once( 'C:\wamp\www\system\load.layout.php' ) ..\index.php:43
3 0.0560 710440 include( 'C:\wamp\www\layouts\tibiacom\layout.php' ) ..\load.layout.php:42

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

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

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo