DBObject fetch() order by?

39 views
Skip to first unread message

Peter

unread,
Jan 7, 2012, 10:03:38 PM1/7/12
to Simple PHP Framework
Im using the DBObject fetch function and want to know is there a
proper way of making the fetch sort the data?

Currently doing it like so:
RoomType::fetch('Select * FROM room_type ORDER BY name ASC');

Is there anything wrong with this?

Tyler Hall

unread,
Jan 7, 2012, 10:18:09 PM1/7/12
to simple-php...@googlegroups.com
That's the preferred way to do it.

Tyler

-RTH (via thumbs)

> --
> You received this message because you are subscribed to the Google Groups "Simple PHP Framework" group.
> To post to this group, send email to simple-php...@googlegroups.com.
> To unsubscribe from this group, send email to simple-php-frame...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/simple-php-framework?hl=en.
>

Reply all
Reply to author
Forward
0 new messages