Hello guys,
I want know how to add an input(field) on sql query.
---QUERY---- IF THIS input IS NULL THEN SELECT ...
Thank you
You'd want to use a UNION statement.
select '', '-- select one --' union select [ValueColumn], [NameColumn] from custom_table where [enabled] = 1 order by 2
Thank you Brenden Kehren for your Answer.
But I want to check,
If this input(field of a form) is null then execute the select.
Please, sign in to be able to submit a new answer.