Re: LIMIT with placeholder

[prev] [thread] [next] [Date index for 2004/06/10]

From: Gabor Szabo
Subject: Re: LIMIT with placeholder
Date: 16:27 on 10 Jun 2004
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

LIMIT with placeholder
Gabor Szabo 02:47 on 10 Jun 2004

Re: LIMIT with placeholder
Tony Bowden 22:01 on 09 Jun 2004

Re: LIMIT with placeholder
Gabor Szabo 16:27 on 10 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52