Post Ordering
barrycarlyon
created: 2006-04-04 09:47:14
Given the following code
sub _newstuff{return LSRfm::Database::Data->search(field => 'newstuff', { order_by=>'date' });}
I wish to order the items by earliest first ie, date DESC, i tried putting DESC after but it crashed my site
sub _newstuff{return LSRfm::Database::Data->search(field => 'newstuff', { order_by=>'date' DESC});}
What is the correct way to do the above?

Yours

Barry Carlyon

Re: Post Ordering
created: 2006-04-04 09:55:28

Did you try this?

{ order_by=>'date DESC'}

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
Re: Post Ordering
created: 2006-04-04 09:59:20

I don't see that package in CPAN (LSRfm::Database::Data) ... is this something homegrown? I would suggest you get your hands on the source and check the search method for optional arguments.


No good deed goes unpunished. -- (attributed to) Oscar Wilde
Re: SOLVED!!! Post Ordering
created: 2006-04-04 11:24:40

When updating a node with a solution, you may wish to simply add an Update: section near the top of the original node's text, and explain the solution/workaround/blinding- flash-that-obviates-the-need-for-a-solution for those who might have a similar problem. Note that changes to the title aren't automatically rolled down to any prior responses, which can cause confusion.

Welcome to the Monastery! :)


No good deed goes unpunished. -- (attributed to) Oscar Wilde

perlmonks.org content © perlmonks.org and barrycarlyon, jeffa, ptum

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03