I have a schedule table and it has 3 fields by default namely e_name, date_from, date_to. For example
e_name = greedyisgood
date_from = 2009/03/05
date_to = 2009/03/10
In my search page I have 2 fields date_from and date_to. What I want is when the user sets a date in the search for example.
date_from = 2009/03/01
date_to = 2009/03/06
The record of greedyisgood will not be shown since he has already a schedule on the date entered by the user.
Any sample query so that I can try it. Thanks
date sql query
Moderator: General Moderators
Re: date sql query
I'm not really clear on what your asking but if you mean you would like a select statement that returns all records but excludes any records by e_name = greedyisgood then:
select * from table where e_name != 'greedyisgood';
The conditional '!=' means not equal to.
Is this what your want?
select * from table where e_name != 'greedyisgood';
The conditional '!=' means not equal to.
Is this what your want?