Stack Exchange
how to check given date exist in table or not?
in my database table contains
id  Start_date End_date      plans
-- ---------   ----------  --------
1  0000-00-00  2015-12-31  classic
2  2016-01-01  0000-00-00  Mini

if i give Start_date ="2016-02-15" End_date ="2016-04-30"
    then my output should be "2  2016-01-01  0000-00-00  Mini
in case if i give Start_date ="2015-06-01" End_date ="2016-04-30"
then my output should be
1  0000-00-00  2015-12-31  classic and 2  2016-01-01  0000-00-00  Mini
previously my query was 
SELECT * FROM plantb WHERE CusID='1' AND AccID='1001' AND SerID='0123456789' AND ( Start_date BETWEEN '2015-06-01' AND '2016-04-30' ) OR ( End_date BETWEEN '2015-06-01' and '2016-04-30') ORDER BY `Start` ASC


ok i used start_date and end_date in my table just here only i have given for better understand

SELECT * FROM `plantb` WHERE `CusID` = 1 AND `AccID` = 1001 AND `SerID` = 0123456789 
AND 
    ((SELECT CASE `Start_date` WHEN '0000-00-00' THEN (`End_date` >= '2015-06-01') ELSE ('2015-06-01' BETWEEN `Start_date` AND `End_date`) END ) OR (SELECT CASE `End_date` WHEN '0000-00-00' THEN (`Start_date` <= '2016-04-30') ELSE ('2016-04-30' BETWEEN `Start_date` AND `End_date`) END ))


i think you just trying to get plans now valid or not by start date end date .
try this 
SELECT * 
FROM plantb 
WHERE CusID='1' 
      AND AccID='1001' 
      AND SerID='0123456789' 
      AND CURDATE() BETWEEN  Start  and  End   
ORDER BY `Start` ASC


note 1 setup correct time in mysql . and view time using select now(); query
