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

Ignore:
Timestamp:
Jan 19, 2008, 2:48:49 PM (15 years ago)
Author:
takanashi
Message:

OpenPNE with Senna

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/takanashi/prj_senna/webapp/lib/db/message.php

    r4933 r4963  
    760760    }
    761761
    762     $where .= " AND ( subject like ? OR body like ?)";
    763 
    764     $params[] = '%'.strval($keyword).'%';
    765     $params[] = '%'.strval($keyword).'%';
     762    if (OPENPNE_USE_SENNA) {
     763        $where .= " AND (MATCH (subject,body) AGAINST(?))";
     764        $params[] = strval($keyword);
     765    } else {
     766        $where .= " AND ( subject LIKE ? OR body LIKE ?)";
     767        $params[] = '%'.strval($keyword).'%';
     768        $params[] = '%'.strval($keyword).'%';
     769    }
    766770
    767771    $sql = "SELECT * FROM c_message";
Note: See TracChangeset for help on using the changeset viewer.