發表文章

目前顯示的是 1月, 2014的文章

SQL Date Search Solution> search for dates that are not within the range.

Vocation date: 9-12 to 11-06 This will show how to search for dates that are off if it's not between the search dates. if  you search for 10-01 to 10-30 this person should show up. ###################################################################################           $todaydate=$_POST[search_date]." 12:00:00";         $sdate1=$_POST[search_date1]." 00:00:00";         $sdate2=$_POST[search_date2]." 23:59:00";         // ###################################################################################         // $sql_text="select *  from leave_all where status='OK' and ('$todaydate'  between date1 and date2 )   order by id desc";          $sql_text="select *  from leave_all where status='OK'                  and  ((date1>='$sdate1' and date2<='$sdate2')  || (date1<'$sdate1' and date2>'$sdate2'))                 ||  ('$_POST[search_date1] 12