From c5f027b4d0ad0490b0fb86c7a6331222a8165e7e Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 8 Dec 2008 03:05:37 +0100 Subject: Added possibility to also set NULL values in UPDATE --- database/sqlite/sqlite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'database/sqlite/sqlite.c') diff --git a/database/sqlite/sqlite.c b/database/sqlite/sqlite.c index 425b128..2bc362b 100644 --- a/database/sqlite/sqlite.c +++ b/database/sqlite/sqlite.c @@ -304,7 +304,8 @@ char *_build_sqlpart(int btyp, eDBfieldMap *map) { char *val = NULL; // If the value is NULL, ignore it if we're building up WHERE clause - if( (ptr->value == NULL) && (btyp == btWHERE) ) { + // or if we're doing an update and the field_type is set to SETNULL (we will set NULL) + if( (ptr->value == NULL) && (btyp == btWHERE || ptr->field_type != ft_SETNULL) ) { continue; } -- cgit