<?php /** * Staty postaci * * @var array */ /** * Staty potwora * * @var array */ (...) /** * Pobieranie danych z bazy Mysql * */ function getvalues() { db_connect(); // zycie potwora i usera oraz id potwora $this->strQuery = "SELECT * FROM fight WHERE id_user = '".$this->intId."' LIMIT 1;"; { $this->arrChar['HP'] = $this->arrRow['hp_char']; $this->arrMob['HP'] = $this->arrRow['hp_mob']; $this->intMob = $this->arrRow['id_mob']; } // staty usera $this->strQuery = "SELECT * FROM stats WHERE user = '".$this->intId."' LIMIT 1;"; { $this->arrChar['MP'] = $this->arrRow['mp']; $this->arrChar['STR'] = $this->arrRow['str']; $this->arrChar['INT'] = $this->arrRow['int']; $this->arrChar['DEF'] = $this->arrRow['def']; $this->arrChar['AGI'] = $this->arrRow['agi']; $this->arrChar['CEL'] = $this->arrRow['cel']; } // Staty potwora $this->sql_cache('mob_'.$this->intMob.''); $this->sql_query ("SELECT lvl, mp, str, `int`, def, agi, cel FROM mobs WHERE id = '".$this->intMob."' ORDER BY id LIMIT 1"); while( $this->sql_fetch_row() ) { $this->arrMob['LVL'] = $this->rows[0]; $this->arrMob['MP'] = $this->rows[1]; $this->arrMob['STR'] = $this->rows[2]; $this->arrMob['INT'] = $this->rows[3]; $this->arrMob['DEF'] = $this->rows[4]; $this->arrMob['AGI'] = $this->rows[5]; $this->arrMob['CEL'] = $this->rows[6]; } $this->sql_cache(); // skill if( $this->intIdSkill !== null ){ $this->strQuery = "SELECT * FROM inventory WHERE id_skill = '".$this->intIdSkill."' AND type = 'skill' AND id_user = '".$this->intId."';"; while( $this->arrRow = mysql_fetch_arrau( $this->mixResult ) ) { $this->arrSkill['HP'] = $this->arrRow['hp']; $this->arrSkill['MP'] = $this->arrRow['mp']; $this->arrSkill['STR'] = $this->arrRow['str']; $this->arrSkill['INT'] = $this->arrRow['int']; $this->arrSkill['DEF'] = $this->arrRow['def']; $this->arrSkill['AGI'] = $this->arrRow['agi']; $this->arrSkill['CEL'] = $this->arrRow['cel']; } } ### test ### { } { } } ?>
chodzi mi o ten moment na koncu (test) ale dalem cala funkcje zeby nbyl wglad do wszystkiego co zwiazane z tym czyms
no i problem jest taki ze ten 'test' nie dziala .... bo praktycznie wywolujac ta funkcje powinien sie on wykonac, a tak sie nie dzieje
<?php $fight = new fight; $fight->getvalues(); ?>
dlaczego tak sie nie dzieje ?