$tj=item.law_id=law.id and law.state_law='1' and law.language!='1' and item.choice_tiao='1';
$sql="CREATE TEMPORARY TABLE tmp SELECT law.id,item.id as id2,1 as er FROM law,item where (item.tiao like binary '%".$tok[0]."%' and law.title1 like binary '%".$tok[0]."%') and ".$tj."
union SELECT law.id,item.id as id2,2 as er FROM law,item where (item.tiao like binary '%".$tok[0]."%' and law.title1 like binary '%".$tok[0]."%') and ".$tj."
union SELECT law.id,item.id as id2,3as er ..........and ".$tj."
union ..........
";
$sql="CREATE TEMPORARY TABLE tmp SELECT law.id,item.id as id2,1 as er FROM law,item where (item.tiao like binary '%".$tok[0]."%' and law.title1 like binary '%".$tok[0]."%') and ".$tj."
union SELECT law.id,item.id as id2,2 as er FROM law,item where (item.tiao like binary '%".$tok[0]."%' and law.title1 like binary '%".$tok[0]."%') and ".$tj."
union SELECT law.id,item.id as id2,3as er ..........and ".$tj."
union ..........
";
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货