I am trying to make an accent insensitive search using collate. But it doesn't work. Furthermore, I heard that my code below might not be optimal if my database becomes really large. Thus, any ideas on how to make this code efficient even for large databases is highly appreciated as well.
<?php
$search_FirstName="%".$_POST['First_Name']."%";
$search_LastName="%".$_POST['Last_Name']."%";
$search_Email="%".$_POST['Email']."%";
$stmt = $con->prepare('SELECT * FROM persons WHERE FirstName LIKE ? collate utf8_general_ci AND LastName LIKE ? collate utf8_general_ci AND Email LIKE ? collate utf8_general_ci');
$stmt->execute([$search_FirstName,$search_LastName,$search_Email]);
?>