1. $sql = “select ( IF( ( match(meta_keyword) against(?) ), (40 + (match(meta_keyword) against(?)) + ( IF( (meta_keyword REGEXP ?),10,0) ) ) , 0 ) ) as meta_keyword_weight, ( IF( ( match(content) against(?) ), (20 + (match(content) against(?)) + ( IF( (content REGEXP ?),10,0) ) ) , 0 ) ) as content_weight, ( IF( ( match(meta_description) against(?) ), (10 + (match(meta_description) against(?)) + ( IF( (meta_description REGEXP ?),5,0) ) ) , 0 ) ) as meta_description_weight, ( IF( ( match(body) against(?) ), (10 + (match(body) against(?)) + ( IF( (body REGEXP ?),5,0) ) ) , 0 ) ) as body_weight, ( IF( ( match(title) against(?) ), (30 + (match(title) against(?)) ) , 0 ) ) as title_weight, ( IF( ( match(meta_title) against(?) ), (10 + (match(meta_title) against(?)) ) , 0 ) ) as meta_title_weight from page_i18n”;
和不错的一个关联SQL