Hi,guys.I have some confusing on order priority of several column in same table.Let say i am using concat for my searching,

$search_keywords=strtolower($search);
$search_keywords = strip_tags($search_keywords);
$search_keywords = mysql_real_escape_string($search_keywords);
        	
$replace_keywords = preg_replace("/[^a-zA-Z0-9:-\s]/", " ", trim($search_keywords));
	$search_exploded = explode(" ",$replace_keywords); //get array keyword
			 	 
$search_exploded = array_unique($search_exploded);  //remove duplicate words
$x=0;
$construct2='';
$searchWords=array();

  foreach($search_exploded as $search_each){
	if(!in_array($search_each, $Filter['invalid_keyword'])&& strlen($search_each) > 2) {
                $searchWords[]=$search_each;
                $x++;
			 if ($x==1){
		$construct2 .= "concat(titleFull, ' ', descFull, ' ', keywords) LIKE '%$search_each%'";
					 	 	 
 }
   else{
	$construct2 .= " OR concat(titleFull , ' ', descFull, ' ', keywords) LIKE '%$search_each%'"; 	
					 	 	 }

so, i wanna ask how i count the occcurences keyword search order in each field (1.titleFull, 2.keywords , 3.descrpt).Can any guys give some idea or opinion on the concept counting priority?Thanks.

the query running will be something like

SELECT * FROM isosalis2.Game WHERE status='A' AND concat(titleFull, ' ', descFull, ' ', keywords) LIKE '%harry%' OR concat(titleFull , ' ', descFull, ' ', keywords) LIKE '%potter%' ORDER BY titleFull DESC,descFull DESC,keywords DESC
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.