Single result from database

I have a search page that searches a database. I have used explode to split the search terms into single words using this code:


<?php
//split search terms seperated by space into array
	$keywordsArray = explode(' ',$search);
	foreach ($keywordsArray as $key => $value) {
		$whereArr[] = 'v.title LIKE '."'%$value%'";
		$whereArr[] = 'v.description LIKE '."'%$value%'";
		}
		
	//define $clause
	$clause = implode(' OR ', $whereArr); 
		
	//end of split

?>

With the search terms split I have a query that looks through the titles and descriptions of defined columns for results. This is working but is returning every instance. I only want 1 instance of a result.

Example:

If a store title has test, it returns that store, currently it’s displaying the store multiple times rather than 1 instance. Same with descriptions.

This is my query:


<?php
$data = mysql_query("SELECT DISTINCT s.store_name, s.image, p.title, p.description FROM storet s LEFT JOIN products p ON p.merchant_name = p.merchant_name WHERE " . $clause . " AND p.active='1' ORDER BY s.storet_name ASC");

while($row = mysql_fetch_array($data)) {
	$store_name = $row['store_name'];
	$image = $row['image'];
?>

Is there a way to see if $store_name exists more than once and then just a single instance of it rather than displaying every instance that a search term appears in the store?

Thanks

No need sorted it by using GROUP BY in my query