Changeset 6521
- Timestamp:
- Apr 11, 2008, 3:30:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php
r6520 r6521 663 663 664 664 /** 665 * PNE_POINT によるメンバーIDリスト絞り込み 666 * 667 * 渡されたメンバーIDの配列を条件に従い絞り込んだものを返す 668 * 669 * @return array 670 */ 671 function db_admin_c_member_id_list4cond_pne_point($ids, $cond_list) 672 { 673 $sql = 'SELECT c_member_id'. 674 ' FROM c_member_profile '. 675 ' INNER JOIN c_profile USING (c_profile_id) '. 676 ' WHERE name = ? '; 677 $params = array('PNE_POINT'); 678 679 // 開始ポイント 680 if (!empty($cond_list['s_point'])) { 681 $sql .= ' AND value >= ?'; 682 $params[] = $cond_list['s_point']; 683 } 684 685 // 終了ポイント 686 if (!empty($cond_list['e_point'])) { 687 $sql .= ' AND value <= ?'; 688 $params[] = $cond_list['e_point']; 689 } 690 691 $point_ids = db_get_col($sql, $params); 692 693 return array_intersect($ids, $point_ids); 694 } 695 696 /** 665 697 * メンバーIDリスト取得(絞り込み対応) 666 698 */ … … 670 702 671 703 $type = explode('-', $order); 672 // ランクでソートとポイントでソートは同等704 // ランクでソートとポイントでソートは同等 673 705 if ($type[0] == 'RANK') { 674 706 $type[0] = 'PNE_POINT'; 675 707 } 676 708 677 // --- ポイントで絞り込み ここから 678 if ( isset($cond_list['s_point']) || isset($cond_list['e_point'])) { 679 680 $sql = 'SELECT c_member_id'. 681 ' FROM c_member_profile '. 682 ' INNER JOIN c_profile USING (c_profile_id) '. 683 ' WHERE name = ? '; 684 $params = array( 685 'PNE_POINT', 686 ); 687 //開始ポイント 688 if (!empty($cond_list['s_point'])) { 689 $sql .= ' AND value >= ?'; 690 $params[] = $cond_list['s_point']; 691 } 692 //終了ポイント 693 if (!empty($cond_list['e_point'])) { 694 $sql .= ' AND value <= ?'; 695 $params[] = $cond_list['e_point']; 696 } 697 698 $point_ids = db_get_col($sql, $params); 699 700 //ポイントで絞り込み 701 $ids = array_intersect($ids, $point_ids); 702 703 } 704 // --- ポイントで絞り込み ここまで 709 // ポイントで絞り込み 710 if (isset($cond_list['s_point']) || isset($cond_list['e_point'])) { 711 $ids = db_admin_c_member_id_list4cond_pne_point($ids, $cond_list); 712 } 705 713 706 714 // --- メールアドレスで絞り込み ここから
Note: See TracChangeset
for help on using the changeset viewer.