CVS: blootbot/src/Factoids DBCommon.pl,1.8,1.9
Brought to you by:
timriker
From: David <dm...@us...> - 2002-11-24 16:48:11
|
Update of /cvsroot/blootbot/blootbot/src/Factoids In directory sc8-pr-cvs1:/tmp/cvs-serv9431 Modified Files: DBCommon.pl Log Message: - db => sql Index: DBCommon.pl =================================================================== RCS file: /cvsroot/blootbot/blootbot/src/Factoids/DBCommon.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- DBCommon.pl 22 Nov 2002 00:47:50 -0000 1.8 +++ DBCommon.pl 24 Nov 2002 16:48:09 -0000 1.9 @@ -10,16 +10,16 @@ ##### # Usage: &setFactInfo($faqtoid, $key, $val); sub setFactInfo { - &dbSet("factoids", + &sqlSet("factoids", { factoid_key => $_[0] }, - { $_[1] => $_[2] } # dbquote done in dbset! + { $_[1] => $_[2] } ); } ##### # Usage: &getFactInfo($faqtoid, [$what]); sub getFactInfo { - return &dbGet("factoids", $_[1], "factoid_key=".&dbQuote($_[0]) ); + return &sqlSelect("factoids", $_[1], { factoid_key => $_[0] } ); } ##### @@ -33,7 +33,7 @@ sub delFactoid { my ($faqtoid) = @_; - &dbDel("factoids", {"factoid_key"=>$faqtoid}); + &sqlDelete("factoids", { factoid_key => $faqtoid } ); &status("DELETED $faqtoid"); return 1; @@ -83,8 +83,8 @@ } shift(@modifiedlist) while (scalar @modifiedlist > 3); - &setFactInfo($faqtoid,"modified_by", join(",",@modifiedlist)); - &setFactInfo($faqtoid,"modified_time", time()); + &setFactInfo($faqtoid, "modified_by", join(",",@modifiedlist)); + &setFactInfo($faqtoid, "modified_time", time()); return 1; } |