Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2008, 12:38 PM
JGD JGD is offline
Junior Member
 
Join Date: Jul 2008
Posts: 9
Default Simple query

When passing a variable to a query I do:

->order($item);

which returns values sorted by the item column.

I would also like to sort the returned value in descending order. When I do:

->order($item,desc);

it doesn't work. This is most likely very simple but I'm not getting very far with it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-09-2008, 04:21 PM
Member
 
Join Date: Jun 2008
Location: Florida
Posts: 88
Default

What about:

Code:
...
    ->order(array('item DESC'));
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-10-2008, 07:50 AM
JGD JGD is offline
Junior Member
 
Join Date: Jul 2008
Posts: 9
Default Re: Simple Query

Answer:

->order("$item DESC");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:25 AM.