From b9402d3e113b408143c7ad18f1cb798023c7d178 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 19 Feb 2005 00:14:26 +0000 Subject: Bug 280497: Replace "LIMIT" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat,a=justdave --- buglist.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'buglist.cgi') 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); } -- cgit v1.2.3-24-g4f1b