]> git.donarmstrong.com Git - infobot.git/commitdiff
sqlite needs inserts, not updates. why was this off?
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 4 Sep 2003 18:39:59 +0000 (18:39 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 4 Sep 2003 18:39:59 +0000 (18:39 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@826 c11ca15a-4712-0410-83d8-924469b57eb5

src/dbi.pl

index f9f731930b5b39d9db54e997fe69506be77895f4..62021144dd82da4beb07d714cb96d6abfb4f36be 100644 (file)
@@ -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.