Problem z accmakerem

Avish

Advanced User
Zarejestrowany
Dołączył
Wrzesień 19, 2008
Posty
219
Liczba reakcji
12
Gdy pr?buje zalo?y? posta? to wyswietla mi sie taki komunikat:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'skulltime' in 'field list'' in C:\xampp\htdocs\pot\OTS_Player.php:112 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(112): PDO->query('SELECT `id`, `n...') #1 C:\xampp\htdocs\pot\OTS_Player.php(140): OTS_Player->load('4') #2 C:\xampp\htdocs\accountmanagement.php(756): OTS_Player->find('Knight Sample') #3 C:\xampp\htdocs\index.php(184): include('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 112
OTS_Player skopiowalem kilka linijek(gdybyscie potrzebowali wiecej):
/**
* Magic PHP5 method.
*
* Allows object serialisation.
*
* @return array List of properties that should be saved.
* @version 0.0.4
* @since 0.0.4
*/
public function __sleep()
{
return array('data', 'skills');
}
/**
* Loads player with given id.
*
* @version 0.1.2
* @param int $id Player's ID.
* @throws PDOException On PDO operation error.
*/
public function load($id)
{
// SELECT query on database

\/ 112 linijka \/

$this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('account_id') . ', ' . $this->db->fieldName('group_id') . ', ' . $this->db->fieldName('sex') . ', ' . $this->db->fieldName('vocation') . ', ' . $this->db->fieldName('experience') . ', ' . $this->db->fieldName('level') . ', ' . $this->db->fieldName('maglevel') . ', ' . $this->db->fieldName('health') . ', ' . $this->db->fieldName('healthmax') . ', ' . $this->db->fieldName('mana') . ', ' . $this->db->fieldName('manamax') . ', ' . $this->db->fieldName('manaspent') . ', ' . $this->db->fieldName('soul') . ', ' . $this->db->fieldName('direction') . ', ' . $this->db->fieldName('lookbody') . ', ' . $this->db->fieldName('lookfeet') . ', ' . $this->db->fieldName('lookhead') . ', ' . $this->db->fieldName('looklegs') . ', ' . $this->db->fieldName('looktype') . ', ' . $this->db->fieldName('lookaddons') . ', ' . $this->db->fieldName('posx') . ', ' . $this->db->fieldName('posy') . ', ' . $this->db->fieldName('posz') . ', ' . $this->db->fieldName('cap') . ', ' . $this->db->fieldName('lastlogin') . ', ' . $this->db->fieldName('lastip') . ', ' . $this->db->fieldName('save') . ', ' . $this->db->fieldName('conditions') . ', ' . $this->db->fieldName('skulltime') . ', ' . $this->db->fieldName('skull') . ', ' . $this->db->fieldName('guildnick') . ', ' . $this->db->fieldName('rank_id') . ', ' . $this->db->fieldName('town_id') . ', ' . $this->db->fieldName('loss_experience') . ', ' . $this->db->fieldName('loss_mana') . ', ' . $this->db->fieldName('loss_skills') . ', ' . $this->db->fieldName('loss_items') . ', ' . $this->db->fieldName('balance') . ', ' . $this->db->fieldName('online') . ', ' . $this->db->fieldName('deleted') . ', ' . $this->db->fieldName('promotion') . ', ' . $this->db->fieldName('marriage') . ', ' . $this->db->fieldName('comment') . ', ' . $this->db->fieldName('created') . ', ' . $this->db->fieldName('hide_char') . ', ' . $this->db->fieldName('old_name') . ', ' . $this->db->fieldName('world_id') . ' FROM ' . $this->db->tableName('players') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch();

/\ 112 linijka /\

// loads skills
if( $this->isLoaded() )
{
foreach( $this->db->query('SELECT ' . $this->db->fieldName('skillid') . ', ' . $this->db->fieldName('value') . ', ' . $this->db->fieldName('count') . ' FROM ' . $this->db->tableName('player_skills') . ' WHERE ' . $this->db->fieldName('player_id') . ' = ' . $this->data['id'])->fetchAll() as $skill)
{
$this->skills[ $skill['skillid'] ] = array('value' => $skill['value'], 'tries' => $skill['count']);
}
}
}
/**
* Loads player by it's name.
*
* @version 0.0.5
* @since 0.0.2
* @param string $name Player's name.
* @throws PDOException On PDO operation error.
*/
public function find($name)
{
// finds player's ID
$id = $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('players') . ' WHERE ' . $this->db->fieldName('name') . ' = ' . $this->db->quote($name) )->fetch();
// if anything was found
if( isset($id['id']) )
{
$this->load($id['id']);
}
else
{
// finds player's ID
$id = $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('players') . ' WHERE ' . $this->db->fieldName('old_name') . ' = ' . $this->db->quote($name) . ' AND ' . $this->db->fieldName('nick_verify') .' = 1')->fetch();
// if anything was found
if( isset($id['id']) )
{
$this->load($id['id']);
}
}
}
/**
* Checks if object is loaded.
*
* @return bool Load state.
*/
public function isLoaded()
{
return isset($this->data['id']);
}
prosze o pomoc bo chyba robienie postaci t ojedna z najwazniejszych rzeczy przy robieniu ots'a
 
Back
Do góry