From 0bb59d6016e2ffef73c0e4deb8a92c680ca7a18c Mon Sep 17 00:00:00 2001 From: timriker Date: Fri, 22 Nov 2002 05:30:23 +0000 Subject: [PATCH] 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 --- src/Factoids/Reply.pl | 4 ++-- src/dbm.pl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.2