aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/mssql.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/mssql.php')
-rw-r--r--phpBB/includes/db/mssql.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index 16b3b3c600..ca8846b60d 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -94,6 +94,18 @@ class dbal_mssql extends dbal
/**
* {@inheritDoc}
*/
+ function sql_conditional($condition, $action_true, $action_false = false)
+ {
+ $sql_condition = 'CASE WHEN ' . $condition;
+ $sql_condition .= ' THEN CAST(' . $action_true . ' AS VARCHAR)';
+ $sql_condition .= ($action_false !== false) ? ' ELSE CAST(' . $action_false . ' AS VARCHAR)' : '';
+ $sql_condition .= ' END';
+ return $sql_condition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
function sql_concatenate($string1, $string2)
{
return $string1 . ' + ' . $string2;