X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=4915b96ef7baeb93c54e4440d985e6ec689e2fb6;hp=c53c9ae3cc785490e9918012525359814f478794;hb=7a486dea647f735a9a1d0381443218ad6affe6e1;hpb=43da86c4a7fab275a941650abb11173f4f2930aa diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index c53c9ae3c..4915b96ef 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -3322,7 +3322,7 @@ sub scalar_sql { defined($scalar) ? $scalar : ''; } -=item count [ WHERE ] +=item count [ WHERE [, PLACEHOLDER ...] ] Convenience method for the common case of "SELECT COUNT(*) FROM table", with optional WHERE. Must be called as method on a class with an @@ -3335,7 +3335,7 @@ sub count { my $table = $self->table or die 'count called on object of class '.ref($self); my $sql = "SELECT COUNT(*) FROM $table"; $sql .= " WHERE $where" if $where; - $self->scalar_sql($sql); + $self->scalar_sql($sql, @_); } =back