Postado Novembro 24, 2015 9 anos 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 Novembro 24, 2015 9 anos por Maykkkin666 Editei por ter formulado a pergunta errada (veja o histórico de edições)
Postado Novembro 25, 2015 9 anos 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! [Designer] / [Developer]
Postado Novembro 28, 2015 9 anos Autor wamp/www/index.php Aí está index.php Editado Novembro 28, 2015 9 anos por Maykkkin666 (veja o histórico de edições)
Postado Novembro 28, 2015 9 anos 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 Novembro 28, 2015 9 anos 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.