From: timriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5> Date: Thu, 4 Sep 2003 18:39:59 +0000 (+0000) Subject: sqlite needs inserts, not updates. why was this off? X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=81903a643fa81fb196622268692cfe3839f652e6;p=infobot.git sqlite needs inserts, not updates. why was this off? git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@826 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/dbi.pl b/blootbot/src/dbi.pl index f9f7319..6202114 100644 --- a/blootbot/src/dbi.pl +++ b/blootbot/src/dbi.pl @@ -240,7 +240,8 @@ sub sqlSet { my $result = &sqlSelect($table, $k, $where_href); # &DEBUG("result is not defined :(") if (!defined $result); - if (1 or defined $result) { + # this was hardwired to use sqlUpdate. sqlite does not do inserts on sqlUpdate. + if (defined $result) { &sqlUpdate($table, $data_href, $where_href); } else { # hack.