In simple scenario, where user input is used to filter data using SQL LIKE, are there any specials characters I should be careful about?
$input = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
// Should I strip characters like '%'?
$sth = $db->prepare("SELECT `id` FROM `names` WHERE `name` LIKE :name");
$sth->execute(['name' => $input . '%']);
I am referring to anything that could dramatically slow down the query/eat up CPU and thus be used for malicious purposes.