PHP PDO Trouble with WHERE LIKE : I'm new to PHP and was wondering how I can execute a like query.

Here is my Model 


    //For search
    public function getSearchResults($username){
        $stmt = $this->_connection->prepare("SELECT * FROM users WHERE username LIKE :username");
        $stmt->execute(['username' => $username]);
        $stmt->setFetchMode(PDO::FETCH_CLASS, "User");
        return $stmt->fetch();
    }

Then in my controller

	function search($name){

		//Get search results
		$searchResults = $this->model('User');
		$searchResults = $searchResults->getSearchResults($name);
		$data = (array) $searchResults;
		
		$this->view('User/search', $data);
	}

However this isn't working, how can I use a like clause?

**Edit Fixed It with the following**

I added $stmt->execute(['username' => '%'.$username.'%']);

instead of $stmt->execute(['username' => $username]);

