What is the correct syntax for using the LIKE operator in a PDO execute statement in PHP?

When using the LIKE operator in a PDO execute statement in PHP, you need to use the '%' wildcard character to match any sequence of characters. The correct syntax is to bind the parameter with the '%' characters concatenated to the value that you want to search for. This will allow you to perform partial string matching using the LIKE operator in your SQL query.

$searchTerm = 'example';
$stmt = $pdo->prepare("SELECT * FROM table_name WHERE column_name LIKE CONCAT('%', :searchTerm, '%')");
$stmt->bindParam(':searchTerm', $searchTerm, PDO::PARAM_STR);
$stmt->execute();