1
bumciach
sorting of Groups issue
  • 2009/10/26 12:25

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Is there any particular reason why the Criteria class is not fully supported by XoopsGroupHandler or XoopsMemberHandler? Something like this does not work:
$member_handler =& xoops_gethandler('member');
$criteria = new Criteria (null);
$criteria->setSort('name');
$criteria->setOrder('ASC');
$groups $member_handler->getGroupList($criteria);

2
ghia
Re: sorting of Groups issue
  • 2009/10/26 13:19

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The criteria are only used to limit the records returned by the group handler (which is used by the member handler).
If you want them ordered, then you have to sort the result array or to do a direct SQL query to the database with eg:
$sql 'SELECT name FROM '.$this->db->prefix('groups').' ORDER BY name';


Login

Who's Online

369 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 369


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits