Hi,
I select 2 fields, and if the second is null I want to change the query.
in example:
I have events. All of them has start date and end date. But if its a one day event, it doesn't have an end date - its null. if its null, I have to use start date. how can I do that?
it should be sth like this:
select startdate,enddate from events where startdate>='xxxx-xx-xx' if(enddate!=null){ and enddate<='xxxx-xx-xx'} else{ startdate<='xxxx-xx-xx'}
but I don't know the if statement in select.
any help will be appreciated.