1.在inculudes/lib_article.php 中 php
找出下列語句,並修改。【約42行】 sql
//增長搜索條件,若是有搜索內容就進行搜索
if ($requirement != '')
{
$sql = 'SELECT article_id, title, author, add_time, file_url, open_type' .
' FROM ' .$GLOBALS['ecs']->table('article') .
' WHERE is_open = 1 AND ' . $cat_str . ' AND title like \'%' . $requirement . '%\' .//本行爲要修改語句 Edited by Lingfeng
' ORDER BY article_type DESC, article_id DESC';
} ui
所修改句子爲: url
--------------------------------------------------------------------------------------------------------------------------------------------------------------------- spa
' WHERE is_open = 1 AND ' . $cat_str . ' AND (title like \'%' . $requirement . '%\' or content like \'%' . $requirement . '%\' )' . rem
--------------------------------------------------------------------------------------------------------------------------------------------------------------------- get
2.再找出: it
function get_article_count($cat_id ,$requirement='')
{
global $db, $ecs;
if ($requirement != '')
{
$count = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('article') . ' WHERE ' . get_article_children($cat_id) . ' AND title like \'%' . $requirement . '%\' and is_open = 1');
} io
所修改後句子爲: table
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$count = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('article') . ' WHERE ' . get_article_children($cat_id) . ' AND ( title like \'%' . $requirement . '%\' or content like \'%' . $requirement . '%\') AND is_open = 1');
---------------------------------------------------------------------------------------------------------------------------------------------------------------------