]> git.donarmstrong.com Git - infobot.git/blobdiff - src/db_mysql.pl
- second round of changes from lear@OPN. thanks!
[infobot.git] / src / db_mysql.pl
index 325069d98fb2e7f7b7b1bb76f4062b95aaab547b..b8fa2c21440ed124ae6f3bdeda3f345995db37f8 100644 (file)
@@ -145,10 +145,7 @@ sub dbGetColNiceHash {
        return;
     }
 
-    # todo: get column names, do $hash{$primkey}{blah} = ...
-    while (my @row = $sth->fetchrow_array) {
-       # reverse it to make it easier to count.
-    }
+    %retval = %{ $sth->fetchrow_hashref() };
 
     $sth->finish;
 
@@ -273,10 +270,10 @@ sub dbInsert {
 }
 
 #####
-# Usage: &dbReplace($table, %hash);
+# Usage: &dbReplace($table, $key %hash);
 #  Note: dbReplace does optional dbQuote.
 sub dbReplace {
-    my ($table, %hash) = @_;
+    my ($table, $key, %hash) = @_;
     my (@keys, @vals);
 
     foreach (keys %hash) {