summaryrefslogtreecommitdiff
path: root/includes/model/Sprache_model.php
blob: 0b18dbca31db76a7bed81940f2b0cff5783586fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

/**
 * Load a string by key.
 *
 * @param string $textid
 * @param string $sprache
 */
function Sprache($textid, $sprache) {
  $sprache_source = sql_select("
      SELECT *
      FROM `Sprache`
      WHERE `TextID`='" . sql_escape($textid) . "'
      AND `Sprache`='" . sql_escape($sprache) . "'
      LIMIT 1
      ");
  if ($sprache_source === false)
    return false;
  if (count($sprache_source) == 1)
    return $sprache_source[0];
  return null;
}

?>