Mercurial > epgrec.yaz
diff Keyword.class.php @ 152:784e3c82926e
mod: yazucchiさんのパッチ取り込み
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 28 Mar 2010 22:13:52 +0900 |
parents | 2cb414518ccd |
children | 190a3c46611d |
line wrap: on
line diff
--- a/Keyword.class.php Sat Mar 27 16:04:54 2010 +0900 +++ b/Keyword.class.php Sun Mar 28 22:13:52 2010 +0900 @@ -37,23 +37,7 @@ $options .= " AND CONCAT(title,description) REGEXP '".mysql_real_escape_string($keyword)."'"; } else { - // 茹茹 - // 翫絲上 - $f_zennum = preg_match('/[0-9]/u', $keyword ); - $f_zenal = preg_match('/[a-zA-Z]/u', $keyword ); - - $options .= " AND ( CONCAT(title,' ',description) like '%".mysql_real_escape_string($keyword)."%'"; - - if( $f_zennum ) { - $options .= " OR CONCAT(title,' ',description) like '%".mysql_real_escape_string(mb_convert_kana( $keyword, 'KVN',"UTF-8" ))."%'"; - } - if( $f_zenal ) { - $options .= " OR CONCAT(title,' ',description) like '%".mysql_real_escape_string(mb_convert_kana( $keyword, 'KVR', "UTF-8" ))."%'"; - } - if( $f_zenal && $f_zennum ) { - $options .= " OR CONCAT(title,' ',description) like '%".mysql_real_escape_string(mb_convert_kana( $keyword, 'KVRN', "UTF-8" ))."%'"; - } - $options .= ") "; + $options .= " AND CONCAT(title,description) like _utf8'%".mysql_real_escape_string($keyword)."%' collate utf8_unicode_ci"; } }