protected function getIdFor($strType, $strNameAbbr)
	{
		// Validate input
		if (!in_array($strType, ['book', 'translation', 'topic']))
			throw new Exception('Invalid entity type "' . $strType . '"');

		// Query the db to get the ID
		$strTableName = 'sudo_bible_' . $strType . 's';
		$q = 'SELECT `id` FROM `' . $strTableName . '` WHERE `name` LIKE ?';
		$aParams = [$strNameAbbr];
		if ('topic' !== $strType) {
			$q .= ' OR `abbr` LIKE ?';
			$aParams[] = $strNameAbbr;
		}
		$aResult = $this->runPreparedQuery($q, $aParams);
		$iId = $aResult[0]->id;

		// Validate result
		if (!is_numeric($iId))
			throw new Exception('Invalid ' . $strType . ' "' .  $strNameAbbr . '" given.');

		return $iId;
	}