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
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)
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.
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! :)
perlmonks.org content © perlmonks.org and barrycarlyon, jeffa, ptum
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03