diff options
author | mkanat%kerio.com <> | 2005-02-19 01:14:26 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-19 01:14:26 +0100 |
commit | b9402d3e113b408143c7ad18f1cb798023c7d178 (patch) | |
tree | ead35cce72a5f7be7fa8660561159eca2174185d /buglist.cgi | |
parent | 62eecf24480520e204ab0057f8f7845c13f37c13 (diff) | |
download | bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.gz bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.xz |
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-x | buglist.cgi | 8 |
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); } |