How to write MySQL syntax correctly, if WHERE clause contains bound parameters, and bound parameters can be either NULL or have some value?
$SQL = "SELECT * FROM tabel
WHERE name = :name AND
family = :family AND
midname = :midname";
It works only if bound parameters aren't NULL. Should I write separate statements in case parameters are NULL?