diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-08 03:05:37 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-08 03:24:08 +0100 |
commit | c5f027b4d0ad0490b0fb86c7a6331222a8165e7e (patch) | |
tree | b8811c9b22e0137b5121cb36fd5c3a2cb66fbfd0 /database/sqlite/sqlite.c | |
parent | 882ac228dc561c2eac588e424c7449176021b392 (diff) | |
download | eurephia-c5f027b4d0ad0490b0fb86c7a6331222a8165e7e.tar.gz eurephia-c5f027b4d0ad0490b0fb86c7a6331222a8165e7e.tar.xz eurephia-c5f027b4d0ad0490b0fb86c7a6331222a8165e7e.zip |
Added possibility to also set NULL values in UPDATE
Diffstat (limited to 'database/sqlite/sqlite.c')
-rw-r--r-- | database/sqlite/sqlite.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |