update XP-level structure
This commit is contained in:
parent
12b7def5b8
commit
647aae9286
9 changed files with 79 additions and 34 deletions
|
|
@ -179,6 +179,31 @@
|
|||
return $data[0];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the XP-level of a Character.
|
||||
*
|
||||
* @param string $characterId ID of the Character
|
||||
* @return array XP-level of Character
|
||||
*/
|
||||
public function getXPLevelOfCharacters($characterId)
|
||||
{
|
||||
$data = $this->db->query(
|
||||
'SELECT xplevels.xps, xplevels.level, xplevels.name '.
|
||||
'FROM v_charactersxplevels '.
|
||||
'INNER JOIN xplevels ON xplevels.id = v_charactersxplevels.xplevel_id '.
|
||||
'WHERE v_charactersxplevels.character_id = ?',
|
||||
'i',
|
||||
$characterId
|
||||
);
|
||||
if(!empty($data)) {
|
||||
return $data[0];
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue