Mercurial > hg > fapweb
changeset 484:c8591a8fadbc
Move stExecSQLCond() to site module.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 07 Dec 2013 15:16:16 +0200 |
parents | adc788e7b5f4 |
children | 9737c24d39d2 |
files | msite.inc.php msitegen.inc.php |
diffstat | 2 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/msite.inc.php Sat Dec 07 13:04:54 2013 +0200 +++ b/msite.inc.php Sat Dec 07 15:16:16 2013 +0200 @@ -132,6 +132,23 @@ } +function stExecSQLCond($sql, $msg = FALSE) +{ + global $db; + if (($res = stDBExecSQL($db, $sql)) !== FALSE) + { + if ($msg !== FALSE) + stSetStatus(200, $msg); + return $res; + } + else + { + stSetStatus(902, "Error in SQL execution."); + return FALSE; + } +} + + function stPrintAttendee($item, $row, $tr, $full, $edit, $eclass = "") { $id = $item["id"];
--- a/msitegen.inc.php Sat Dec 07 13:04:54 2013 +0200 +++ b/msitegen.inc.php Sat Dec 07 15:16:16 2013 +0200 @@ -561,19 +561,7 @@ } -function stExecSQLCond($sql, $msg = FALSE) { - if (($res = stExecSQL($sql)) !== FALSE) - { - if ($msg !== FALSE) - stSetStatus(200, $msg); - return $res; - } - else - { - stSetStatus(902, "Error in SQL execution."); - return FALSE; - } }