Joomla seach problem

Hello! i am trying to modify a search and am a beginner at mysql.
This is for a joomla site and I have a separate search module running which is supposed to just return results of a specific nature on a specific page.

Ideally it would be searching from a specific folder, but I can only see a way to direct to an existing category or section - unfortunately the way the uploader is, it’s a root folder undefined as such…

In looking for a path of least resistance, i was thinking i could either change the search to look for a specific file name prefix ( say… INT.) or search for items with only a specific meta tag (least ideal)…

Here is the part that I think i have to modify - i really don’t need it to search for anything else except in the title - unless going the meta route. So i guess that can be deleted…

I just can’t figure out how to write it so that it looks for the match - i keep getting code errors…

i just want: title = INT%
… or if someone has experience with joomla and how to point the core search to a different folder… ;o)

All help is appreciated!

$wheres = array();
	switch ($phrase) {
		case 'exact':
			$text		= $db->Quote( '%'.$db->getEscaped( $text, true ).'%', false );
			$wheres2 	= array();
			$wheres2[] 	= 'a.title LIKE '.$text;
			$wheres2[] 	= 'a.introtext LIKE '.$text;
			$wheres2[] 	= 'a.fulltext LIKE '.$text;
			$wheres2[] 	= 'a.metakey LIKE '.$text;
			$wheres2[] 	= 'a.metadesc LIKE '.$text;
			$where 		= '(' . implode( ') OR (', $wheres2 ) . ')';

		case 'all':
		case 'any':
			$words = explode( ' ', $text );
			$wheres = array();
			foreach ($words as $word) {
				$word		= $db->Quote( '%'.$db->getEscaped( $word, true ).'%', false );
				$wheres2 	= array();
				$wheres2[] 	= 'a.title LIKE '.$word;
				$wheres2[] 	= 'a.introtext LIKE '.$word;
				$wheres2[] 	= 'a.fulltext LIKE '.$word;
				$wheres2[] 	= 'a.metakey LIKE '.$word;
				$wheres2[] 	= 'a.metadesc LIKE '.$word;
				$wheres[] 	= implode( ' OR ', $wheres2 );
			$where = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wheres ) . ')';