summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/adodb-sqlite3.inc.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/adodb-sqlite3.inc.php b/drivers/adodb-sqlite3.inc.php
index 27a1562a..6d25762e 100644
--- a/drivers/adodb-sqlite3.inc.php
+++ b/drivers/adodb-sqlite3.inc.php
@@ -54,6 +54,18 @@ class ADODB_sqlite3 extends ADOConnection {
return $arr;
}
+ /**
+ * Return string with a database specific IFNULL statement
+ *
+ * @param string $field Field name to check for null
+ * @param string $ifNull Value to return if $field is null
+ *
+ * @return string
+ */
+ function IfNull( $field, $ifNull ) {
+ return " IFNULL($field, $ifNull) "; // if SQLite 3.X
+ }
+
function BeginTrans()
{
if ($this->transOff) {