From: timriker Date: Fri, 22 Nov 2002 05:30:23 +0000 (+0000) Subject: dbm dbGet returns wrong field order X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0bb59d6016e2ffef73c0e4deb8a92c680ca7a18c;p=infobot.git dbm dbGet returns wrong field order git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@680 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Factoids/Reply.pl b/src/Factoids/Reply.pl index 4ba2135..176a62b 100644 --- a/src/Factoids/Reply.pl +++ b/src/Factoids/Reply.pl @@ -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"; diff --git a/src/dbm.pl b/src/dbm.pl index e1300ed..0048143 100644 --- a/src/dbm.pl +++ b/src/dbm.pl @@ -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);