Mercurial > hg > fapweb
changeset 1093:7bfa5a38b6ca
Move function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 26 Jan 2017 13:56:34 +0200 |
parents | 95b74632cfe2 |
children | 563fc90de965 |
files | msitegen.inc.php |
diffstat | 1 files changed, 16 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/msitegen.inc.php Thu Jan 26 13:38:19 2017 +0200 +++ b/msitegen.inc.php Thu Jan 26 13:56:34 2017 +0200 @@ -547,21 +547,6 @@ } -function stDBGetSQLParam($dbh, $type, $value) -{ - switch ($type) - { - case "d": return intval($value); - case "s": return $dbh->quote($value); - case "b": return intval($value) ? 1 : 0; - case "D": return intval(stGetRequestItem($value)); - case "S": return $dbh->quote(stGetRequestItem($value)); - case "Q": return $dbh->quote(stGetRequestItem($value)); - case "B": return intval(stGetRequestItem($value)) ? 1 : 0; - } -} - - function stConnectSQLDB() { global $db; @@ -580,6 +565,22 @@ } +function stDBGetSQLParam($dbh, $type, $value) +{ + switch ($type) + { + case "d": return intval($value); + case "s": return $dbh->quote($value); + case "b": return intval($value) ? 1 : 0; + + case "D": return intval(stGetRequestItem($value)); + case "S": return $dbh->quote(stGetRequestItem($value)); + case "Q": return $dbh->quote(stGetRequestItem($value)); + case "B": return intval(stGetRequestItem($value)) ? 1 : 0; + } +} + + function stDBPrepareSQLUpdate($dbh, $table, $cond, $pairs) { $sql = array();