Hier habe ich beide hair_color gemacht und eye_color Optional. (Übergeben Sie das Äquivalent von NULL in Ihrer Sprache).
SELECT * from users where
($1 is null or hair_color = $1) and
($2 is null or eye_color = $2);
Hier habe ich beide hair_color gemacht und eye_color Optional. (Übergeben Sie das Äquivalent von NULL in Ihrer Sprache).
SELECT * from users where
($1 is null or hair_color = $1) and
($2 is null or eye_color = $2);