@@ 29-36 (lines=8) @@ | ||
26 | * @param $key |
|
27 | * @return mixed|null |
|
28 | */ |
|
29 | public function fetchSetting($key) |
|
30 | { |
|
31 | $conn = $this->getDbConn(); |
|
32 | $row = $conn->fetchAssoc('SELECT settingValue FROM settings WHERE settingKey=:key', ['key' => $key]); |
|
33 | ||
34 | return $row ? $row['settingValue'] : null; |
|
35 | // rowCount seems to not work on sqlite: http://php.net/manual/en/pdostatement.rowcount.php |
|
36 | } |
|
37 | } |
|
38 |
@@ 624-630 (lines=7) @@ | ||
621 | * |
|
622 | * @return array |
|
623 | */ |
|
624 | public function fetchTicketById($id) |
|
625 | { |
|
626 | $conn = $this->getDbConn(); |
|
627 | $song = $conn->fetchAssoc('SELECT * FROM ' . self::TICKETS_TABLE . ' WHERE id = :id', ['id' => $id]); |
|
628 | ||
629 | return $song; |
|
630 | } |
|
631 | ||
632 | /** |
|
633 | * Get current value of a named setting, NULL if missing |