ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 3613


Ignore:
Timestamp:
Aug 2, 2007, 3:34:31 PM (12 years ago)
Author:
ToshihiroK
Message:

biz_getGroupListのorder byを削除

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/kimura/2_9_1/webapp_biz/modules/biz/lib/mysql_functions.php

    r3591 r3613  
    369369
    370370//指定された条件に見合うグループのリストを得る関数
    371 function biz_getGroupList($keyword = '', $page = 0, $page_size = 20, $order = 'biz_group_id')
     371function biz_getGroupList($keyword = '', $page = 0, $page_size = 20)
    372372{
    373373
    374374    //keywordあり
    375375    if ($keyword) {
    376         $where = ' WHERE true AND (info LIKE ? OR name LIKE ?) ORDER BY ?';
     376        $where = ' WHERE true AND (info LIKE ? OR name LIKE ?) ORDER BY biz_group_id';
    377377        $sql = 'SELECT * FROM biz_group'. $where;
    378378
     
    380380            '%'.$keyword.'%',
    381381            '%'.$keyword.'%',
    382             $order,
    383382        );
    384383        $list = db_get_all_page($sql, $page, $page_size, $params);
     
    386385    } else {
    387386        $where = '';
    388         $sql = 'SELECT * FROM biz_group ORDER BY ? desc';
    389 
    390         $params = array(
    391             $order,
    392         );
    393         $list = db_get_all_page($sql, $page, $page_size, $params);
     387        $sql = 'SELECT * FROM biz_group ORDER BY biz_group_id';
     388
     389        $params = array();
     390        $list = db_get_all_page($sql, $page, $page_size);
    394391    }
    395392
     
    401398        $count = count(biz_getGroupMember($value['biz_group_id']));
    402399        $list[$key]['count'] = $count;
    403     }
    404 
    405     if ($keyword) {
    406         $params = array(
    407             '%'.$keyword.'%',
    408             '%'.$keyword.'%',
    409             $order,
    410         );
    411     } else {
    412         $params = array();
    413400    }
    414401
Note: See TracChangeset for help on using the changeset viewer.