aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-19 00:14:26 +0000
committermkanat%kerio.com <>2005-02-19 00:14:26 +0000
commitb9402d3e113b408143c7ad18f1cb798023c7d178 (patch)
treeead35cce72a5f7be7fa8660561159eca2174185d /buglist.cgi
parentBug 280494: Replace "SELECT LAST_INSERT_ID()" with Bugzilla::DB function call (diff)
downloadbugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.gz
bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.bz2
bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.zip
Bug 280497: Replace "LIMIT" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=justdave
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi8
1 files changed, 4 insertions, 4 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 65391f779..4b9bc960f 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -294,8 +294,8 @@ sub GetQuip {
. " FROM quips WHERE approved = 1");
my $random = int(rand($count));
my $quip =
- $dbh->selectrow_array("SELECT quip FROM quips"
- . " WHERE approved = 1 LIMIT $random,1");
+ $dbh->selectrow_array("SELECT quip FROM quips WHERE approved = 1 " .
+ $dbh->sql_limit(1, $random));
return $quip;
}
@@ -746,10 +746,10 @@ my $search = new Bugzilla::Search('fields' => \@selectnames,
my $query = $search->getSQL();
if ($::FORM{'limit'} && detaint_natural($::FORM{'limit'})) {
- $query .= " LIMIT $::FORM{'limit'}";
+ $query .= " " . $dbh->sql_limit($::FORM{'limit'});
}
elsif ($fulltext) {
- $query .= " LIMIT 200";
+ $query .= " " . $dbh->sql_limit(200);
}