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

Ignore:
Timestamp:
Oct 3, 2007, 8:02:58 PM (13 years ago)
Author:
ogawa
Message:

#1348:MySQL4.0以前の環境で管理画面のメンバーリストに誰も表示されない

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/review.php

    r3738 r4272  
    162162    $from = " FROM c_review INNER JOIN c_review_comment USING (c_review_id)";
    163163
    164     $where = ' WHERE true';
     164    $wheres = array();
    165165    $params = array();
    166166    if ($keyword) {
    167         $where .= ' AND c_review.title LIKE ?';
     167        $wheres[] = 'c_review.title LIKE ?';
    168168        $params[] = '%'.check_search_word($keyword).'%';
    169169    }
    170170    if ($category_id) {
    171         $where .= ' AND c_review.c_review_category_id = ?';
     171        $wheres[] = 'c_review.c_review_category_id = ?';
    172172        $params[] = intval($category_id);
     173    }
     174    if ($wheres) {
     175        $where = ' WHERE ' . implode(' AND ', $wheres);
     176    } else {
     177        $where = '';
    173178    }
    174179
Note: See TracChangeset for help on using the changeset viewer.