Re: order_by
[prev]
[thread]
[next]
[Date index for 2004/12/23]
On Thu, Dec 23, 2004 at 10:23:51AM +0000, jay@xxxxxxx.xxx wrote:
> Hi
>
> I have a list of news articles in a database which I want to retrieve in date order. I can't find a way to do this. I've tried:
>
> my @news = $self->search({order_by => 'date'});
>
> but I get the following error:
>
> order_by is not a column of Functions::News at news.cgi line 38
>
> which makes sense I guess. I'm sure this must be very easy to do - where am I going wrong?
You haven't said which column to search on!
my @news = $self->search(group => 'alt.binaries', {order_by => 'date'});
m.
--
Karen (on phone booking a hotel): No, not 'm' as in Mary, 'n' as in gnat.
--
Gotta have a blog. It is the law.
http://www.stray-toaster.co.uk/blog/
 |
 |
Re: order_by
Stray Toaster 10:28 on 23 Dec 2004
|