commit 8b2233b14dc21c2d493d8b6c0f2e168ac72f9150
parent 23aa884628850ef72f1af38b672872079fb5cf8f
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 23 Dec 2019 16:29:20 +0100
Make dbupd() works with non-numeric keys.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bored.php b/bored.php
@@ -218,7 +218,7 @@ function dbupd($tbl, $items, $pk = "id") {
 			$v = isset($item[$k]) ? dbin($item[$k]) : "`${k}`";
 			if(!isset($when[$k]))
 				$when[$k] = [];
-			$when[$k][] = "when $pv then $v";
+			$when[$k][] = "when '$pv' then $v";
 		}
 	}
 	$sets = [];