Skip to content

Commit

Permalink
Removed hard coded number.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuth committed Sep 26, 2010
1 parent 24f2a29 commit 74ec16a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions get_ips.inc.php
Expand Up @@ -118,11 +118,12 @@ function fivestarstats_get_ips_lowest_vote_average($num) {
// Right now, we're hard coding in a minimum of 10 votes.
// I'll probably change this later.
//
. "HAVING cnt >=10 "
. "HAVING cnt >= %d "
. "ORDER BY avg ASC, cnt DESC "
. "LIMIT $num "
;
$cursor = db_query($query);
$query_args = array($num);
$cursor = db_query($query, $query_args);
while ($row = db_fetch_array($cursor)) {
$ip = $row["vote_source"];
$retval[$ip] = array(
Expand Down

0 comments on commit 74ec16a

Please sign in to comment.