i want to compare dates stored in database in the format yyyy-mm-dd by changing it in unixtimestamp in the mysql query.for this my query is
$bquery="SELECT * FROM rt_booking WHERE rt_unit_id='".$_POST['unit_id']."' AND (SELECT UNIX_TIMESTAMP(str_to_date(rt_start_date,'%Y-%m-%d'))>=".$my11." OR SELECT UNIX_TIMESTAMP(str_to_date(rt_end_date,'%Y-%m-%d'))<=".$my22.")";
but it is giving syntax error.