Postado Março 7, 2015 10 anos Quando tento dar login em alguma conta ocorre o seguinte erro! ERRO... Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'reason' in 'field list'' in C:\xampp\htdocs\pot\OTS_AccountBan.php:55 Stack trace: #0 C:\xampp\htdocs\pot\OTS_AccountBan.php(55): PDO->query('SELECT `id`, `t...') #1 C:\xampp\htdocs\pot\OTS_Account.php(955): OTS_AccountBan->find('1') #2 C:\xampp\htdocs\accountmanagement.php(34): OTS_Account->isBanned() #3 C:\xampp\htdocs\index.php(219): include('C:\xampp\htdocs...') #4 {main} thrown inC:\xampp\htdocs\pot\OTS_AccountBan.php on line 55 Arquivo... <?php /** * @package POT * @version 0.1.6 * @since 0.1.5 * @author Wrzasq <[email protected]> * @copyright 2007 - 2008 © by Wrzasq * @license http://www.gnu.org/licenses/lgpl-3.0.txtGNU Lesser General Public License, Version 3 */ /** * OTServ account ban. * * @package POT * @version 0.1.6 * @since 0.1.5 */ class OTS_AccountBan extends OTS_Ban { /** * Ban data. * * @var array * @version 0.1.6 * @since 0.1.5 */ protected $data = array('type' => POT::BAN_ACCOUNT, 'param' => 0, 'active' => true, 'admin_id' => 0, 'comment' => '', 'reason' => 0); /** * Loads account ban with given id. * * @version 0.1.5 * @since 0.1.5 * @param int $id Ban ID. * @throws PDOException On PDO operation error. */ public function load($id) { // SELECT query on database $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('type') . ', ' . $this->db->fieldName('value') . ', ' . $this->db->fieldName('param') . ', ' . $this->db->fieldName('active') . ', ' . $this->db->fieldName('expires') . ', ' . $this->db->fieldName('added') . ', ' . $this->db->fieldName('admin_id') . ', ' . $this->db->fieldName('comment') . ', ' . $this->db->fieldName('reason') . ' FROM ' . $this->db->tableName('bans') . ' WHERE ' . $this->db->fieldName('type') . ' = ' . POT::BAN_ACCOUNT . ' AND ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); } /** * Loads account ban by banned account ID. * * @version 0.1.5 * @since 0.1.5 * @param int $id Account's ID. * @throws PDOException On PDO operation error. */ public function find($id) { // SELECT query on database $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('type') . ', ' . $this->db->fieldName('value') . ', ' . $this->db->fieldName('param') . ', ' . $this->db->fieldName('active') . ', ' . $this->db->fieldName('expires') . ', ' . $this->db->fieldName('added') . ', ' . $this->db->fieldName('admin_id') . ', ' . $this->db->fieldName('comment') . ', ' . $this->db->fieldName('reason') . ' FROM ' . $this->db->tableName('bans') . ' WHERE ' . $this->db->fieldName('type') . ' = ' . POT::BAN_ACCOUNT . ' AND ' . $this->db->fieldName('value') . ' = ' . (int) $id)->fetch(); } } ?> teria como alguem ensinar como arrumar o problema??? obrigado desde já +rep Editado Março 7, 2015 10 anos por s2dieginho (veja o histórico de edições)
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.