I have this line in PHP that is building a query parameter in PDO:
$p[':criteria'] = '%' . $search . '%';
d.d_name LIKE :criteria
Bind mecanism is too generic because it has to deal with many types and there are some edge cases like this.
So in this case, instead of using bind, mount your query as a string:
$sql = "...whatever d.d_name LIKE '%" . $search . "%'";
Debug $search to be sure it doesn't have any quotes or anything before concatenating. If it has remove with trim or something like that.
Also be sure to validate $search correctly because of sql-injection attacks.