assign Character titles via QR-codes (implements #118)
This commit is contained in:
parent
40d2aa5768
commit
eddc4036cf
6 changed files with 101 additions and 3 deletions
|
|
@ -69,7 +69,7 @@
|
|||
public function getTitleByHash($titleHash)
|
||||
{
|
||||
$data = $this->db->query(
|
||||
'SELECT id, hash, title_male, title_female '.
|
||||
'SELECT id, seminary_id, hash, title_male, title_female '.
|
||||
'FROM charactertitles '.
|
||||
'WHERE hash = ?',
|
||||
's',
|
||||
|
|
@ -123,6 +123,26 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a Character title to the list of titles for a Character.
|
||||
*
|
||||
* @param int $titleId ID of title to assign
|
||||
* @param int $characterId ID of Character to assign title to
|
||||
*/
|
||||
public function assignTitleToCharacter($titleId, $characterId)
|
||||
{
|
||||
$this->db->query(
|
||||
'INSERT IGNORE INTO characters_charactertitles '.
|
||||
'(character_id, charactertitle_id) '.
|
||||
'VALUES '.
|
||||
'(?, ?)',
|
||||
'ii',
|
||||
$characterId,
|
||||
$titleId
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if a title for a Characters already exists.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue