What are the advantages and disadvantages of using COUNT(*) in conjunction with LIKE when querying a database in PHP to count specific occurrences of complications?

When querying a database in PHP to count specific occurrences of complications, using COUNT(*) in conjunction with LIKE can be advantageous as it allows for a more targeted search for patterns within the data. This can make it easier to identify and track specific occurrences of complications. However, using LIKE can also be resource-intensive and may slow down the query if not used efficiently.

$query = "SELECT COUNT(*) FROM complications_table WHERE complication_description LIKE '%specific_complication%'";
$result = mysqli_query($connection, $query);
$row = mysqli_fetch_array($result);
$count = $row[0];
echo "Number of specific complications: " . $count;