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

Changeset 3548


Ignore:
Timestamp:
Jul 25, 2007, 3:52:37 PM (12 years ago)
Author:
ToshihiroK
Message:

SQL標準化:db_get_all_limit()を使用するよう修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/prj/postgres/standardSQL/webapp/modules/admin/lib/db_admin.php

    r3532 r3548  
    11151115    }
    11161116    $sql .= " and target_c_commu_id <> 0 ";
    1117     $sql .= " group by target_c_commu_id " .$orderby_str." offset $start limit $page_size";
    1118     $list = db_get_all($sql,$params);
     1117
     1118    $sql .= " group by target_c_commu_id " .$orderby_str;
     1119    $list = db_get_all_limit($sql, $start, $page_size, $params);
    11191120
    11201121    $return = array();
     
    11941195    }
    11951196    $sql = "select target_c_commu_topic_id , count(*) as count from c_access_log ";
    1196     $sql .= $where." group by target_c_commu_topic_id " .$orderby_str." offset $start limit $page_size";
    1197     $list = db_get_all($sql,$params);
     1197    $sql .= $where." group by target_c_commu_topic_id " .$orderby_str;
     1198    $list = db_get_all_limit($sql, $start, $page_size, $params);
    11981199    $sql = "select count(*) from c_access_log ";
    11991200    $sql .= $where ." group by target_c_commu_topic_id ";
     
    12641265    }
    12651266    $sql .= " and target_c_diary_id <> 0 ";
    1266     $sql .= " group by target_c_diary_id " . $orderby_str. " offset $start limit $page_size";
    1267     $list = db_get_all($sql,$params);
     1267    $sql .= " group by target_c_diary_id " . $orderby_str;
     1268    $list = db_get_all_limit($sql, $start, $page_size, $params);
    12681269
    12691270    $return = array();
     
    13431344
    13441345    $sql = "select c_member_id , count(*) as count from c_access_log";
    1345     $sql .= $where." group by c_member_id $orderby_str offset $start limit $page_size";
    1346     $list = db_get_all($sql,$params);
     1346    $sql .= $where." group by c_member_id $orderby_str";
     1347    $list = db_get_all_limit($sql, $start, $page_size, $params);
    13471348    $sql = "select count(*) from c_access_log ";
    13481349    $sql .=    $where ." group by c_member_id ";
     
    14101411    $sql .= $where;
    14111412    $sql .= " AND target_c_member_id <> 0 ";
    1412     $sql .= " group by target_c_member_id " . $orderby_str. " offset $start limit $page_size";
    1413 
    1414     $list = db_get_all($sql,$params);
     1413    $sql .= " group by target_c_member_id " . $orderby_str;
     1414
     1415    $list = db_get_all_limit($sql, $start, $page_size, $params);
    14151416
    14161417    $return = array();
     
    15401541    $order = " order by c_member_id";
    15411542
    1542     $sql = $select . $where . $order . $limit;
     1543    $sql = $select . $where . $order;
    15431544    $list = db_get_all_limit($sql, 0, $limit, $params);
    15441545   
Note: See TracChangeset for help on using the changeset viewer.