diff options
author | Philip Häusler <msquare@notrademark.de> | 2013-09-18 01:38:36 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2013-09-18 01:38:36 +0200 |
commit | bfb0cacd541cc20129a3c0ac77130370741dca18 (patch) | |
tree | 0a0e86e1a53d712065664c12d06603bc044df9ec /includes/model/Sprache_model.php | |
parent | d50cc21f50cb3ec3afdabb74a20d81bd1a53dfbd (diff) |
mysql to mysqli and a lot of cleanup and mvc
Diffstat (limited to 'includes/model/Sprache_model.php')
-rw-r--r-- | includes/model/Sprache_model.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/model/Sprache_model.php b/includes/model/Sprache_model.php new file mode 100644 index 00000000..55683411 --- /dev/null +++ b/includes/model/Sprache_model.php @@ -0,0 +1,18 @@ +<?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; +} + + +?>
\ No newline at end of file |