CVS: blootbot/src/Factoids Reply.pl,1.30,1.31
Brought to you by:
timriker
From: David <dm...@us...> - 2002-11-24 12:55:18
|
Update of /cvsroot/blootbot/blootbot/src/Factoids In directory sc8-pr-cvs1:/tmp/cvs-serv29276 Modified Files: Reply.pl Log Message: - new sql functions changeover. Index: Reply.pl =================================================================== RCS file: /cvsroot/blootbot/blootbot/src/Factoids/Reply.pl,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Reply.pl 22 Nov 2002 05:30:23 -0000 1.30 +++ Reply.pl 24 Nov 2002 12:55:15 -0000 1.31 @@ -28,8 +28,11 @@ $message =~ tr/A-Z/a-z/; - my ($count, $fauthor, $result) = &dbGet("factoids", - "requested_count,created_by,factoid_value", "factoid_key=".&dbQuote($message) ); + my ($count, $fauthor, $result) = &sqlSelect("factoids", + "requested_count,created_by,factoid_value", + { factoid_key => $message } + ); + if ($result) { $lhs = $message; $mhs = "is"; @@ -61,7 +64,7 @@ ### FIXME: old mysql doesn't support ### "requested_count=requested_count+1". $count++; - &dbSet("factoids", {'factoid_key' => $lhs}, { + &sqlSet("factoids", {'factoid_key' => $lhs}, { requested_by => $nuh, requested_time => time(), requested_count => $count |