FULLTEXT Search Help

I had my fulltext search class working fine last week and all of a sudden it quit working. Can anyone point out the error? The db fields are set to FULLTEXT…

The NumRows keeps coming back as 0 if I search for say Apples, even though I have 3 posts with the word Apples in the title and description… what am I doing wrong?


require_once 'classes/SearchClass.php';

$search_term = trim($_POST['search_term']);
$search_type = trim($_POST['search_type']);
					
try {
	$search = new Search();
	$search->searchQuery($search_term,$search_type);
	$searchResults = $search->getResults();
	$searchNumRows = $search->getNumRows();
	$searchError = $search->getError();
					
	if ($searchNumRows == 0) {
		echo "<div id=\\"alert\\" class=\\"notice\\">Search did not find any results</div>";
	}
	else {
             // display results
    }


public function searchQuery ($search_term,$search_type) {
		
if (!$this->error) {
		
	$this->_search_term = $search_term;
	$this->_search_type = $search_type;
	$this->_flaglimit = 3;
	$this->_now = time();
			
	try {
	    $this->_dbh->beginTransaction();
				
	    $this->stmt = $this->_dbh->prepare("SELECT * FROM posts WHERE MATCH (post_title,post_description) AGAINST (':search_term') AND post_flag < $this->_flaglimit AND post_date > $this->_now");
				
		$this->stmt->bindParam(':search_term', $this->_search_term, PDO::PARAM_STR);
				
		$this->stmt->execute();
		$this->_dbh->commit();
				
	}
	catch(PDOException $e) {
		$this->_dbh->rollBack();
		$this->error = $e->getMessage();
	}
			
	$this->result = $this->stmt->fetchAll(PDO::FETCH_ASSOC);

	$this->num_rows = count($this->result);
			
	$this->_dbh = null; // closes database connection //
			
} // closes if statement //
		
} // closes search function //
	
	
// get number of rows in query result //
	public function getNumRows() {
	return $this->num_rows;
	}
	
// get the actual search results //
	public function getResults() {
	return $this->result;
	}
	
// get error value if it exists //
	public function getError() {
	return $this->error;
	}
}

?>