Re: LIMIT with placeholder
[prev]
[thread]
[next]
[Date index for 2004/06/10]
On Wed, 9 Jun 2004, Tony Bowden wrote:
> __PACKAGE__->set_sql(latest => "SELECT __ESSENTIAL__ FROM __TABLE__ LIMIT %s");
>
> sub retrieve_latest {
> my ($class, $count) = @_;
> return $class->sql_to_objects($class->sql_latest($count));
> }
>
Thanks for the explanation, it works now !
Just for future searchers, there was a typo in the above code
should be sth_to_objects instead of sql_to_objects
sub retrieve_latest {
my ($class, $count) = @_;
return $class->sth_to_objects($class->sql_latest($count));
}
Gabor