summaryrefslogtreecommitdiff
path: root/drivers/adodb-sqlite3.inc.php
diff options
context:
space:
mode:
authorMark Newnham <mark@newnhams.com>2025-08-11 19:42:15 -0600
committerMark Newnham <mark@newnhams.com>2025-08-11 19:42:15 -0600
commit54bf65e764540ef72b70a5b0e9605f28734c899e (patch)
tree3608e25839b16408acc747186caffb63da41f419 /drivers/adodb-sqlite3.inc.php
parent6462bbba18ccbf3f90f7cfbeafc2ee272ea6788a (diff)
downloadadodb-54bf65e764540ef72b70a5b0e9605f28734c899e.tar.gz
adodb-54bf65e764540ef72b70a5b0e9605f28734c899e.tar.bz2
adodb-54bf65e764540ef72b70a5b0e9605f28734c899e.zip
Added sqlite3 specific ifnull to driver
Diffstat (limited to 'drivers/adodb-sqlite3.inc.php')
-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) {