]> git.donarmstrong.com Git - infobot.git/commitdiff
dbm dbGet returns wrong field order
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 22 Nov 2002 05:30:23 +0000 (05:30 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 22 Nov 2002 05:30:23 +0000 (05:30 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@680 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Reply.pl
src/dbm.pl

index 4ba2135ad4259879418dd9150b3c6d8810331cbf..176a62b38f092b6f49661cc0c11d53a50e431b1e 100644 (file)
@@ -28,8 +28,8 @@ sub getReply {
 
     $message =~ tr/A-Z/a-z/;
 
-    my ($result, $fauthor, $count) = &dbGet("factoids", 
-       "factoid_value,created_by,requested_count", "factoid_key=".&dbQuote($message) );
+    my ($count, $fauthor, $result) = &dbGet("factoids", 
+       "requested_count,created_by,factoid_value", "factoid_key=".&dbQuote($message) );
     if ($result) {
        $lhs = $message;
        $mhs = "is";
index e1300ed462ce0aeabf0ca481a61ae2848656ab74..0048143fa1ab457f03e6dc95d8c5a93a069b8615 100644 (file)
@@ -153,6 +153,8 @@ sub dbGet {
        return(@retval);
     }
 
+    # FIXME this should be in $select order
+    # and it's now in field order
     &DEBUG("dbGet: select=>'$select'.");
     my @array = split "$;", ${"$table"}{lc $val};
     unshift(@array,$val);