comparison Keyword.class.php @ 118:db185340a981

utf8 collate try1
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 14 Mar 2010 20:16:04 +0900
parents 7a64d5e3baee
children a18df712fc7e
comparison
equal deleted inserted replaced
117:f5d58cf2842f 118:db185340a981
34 if( $keyword != "" ) { 34 if( $keyword != "" ) {
35 if( $use_regexp ) { 35 if( $use_regexp ) {
36 $options .= " AND CONCAT(title,description) REGEXP '".mysql_real_escape_string($keyword)."'"; 36 $options .= " AND CONCAT(title,description) REGEXP '".mysql_real_escape_string($keyword)."'";
37 } 37 }
38 else { 38 else {
39 $options .= " AND CONCAT(title,description) like '%".mysql_real_escape_string($keyword)."%'"; 39 $options .= " AND CONCAT(title,description) like _utf8'%".mysql_real_escape_string($keyword)."%' collate utf8_unicode_ci";
40 } 40 }
41 } 41 }
42 42
43 if( $type != "*" ) { 43 if( $type != "*" ) {
44 $options .= " AND type = '".$type."'"; 44 $options .= " AND type = '".$type."'";