I'm trying to make a query via php in Mysql, but it's not working in PHP, but it works in PHPMYADMIN.
$check_in = strtotime($arrival);
$check_out = strtotime($departure);
Queries I've tried in PHP ...
$query = "SELECT * FROM wp_st_availability WHERE post_id = 5993 AND check_in > '$check_in' and check_in < '$check_out'";
$query = "SELECT * FROM wp_st_availability WHERE post_id = '5993' AND check_in > '$check_in' and check_in < '$check_out'";
$query = "SELECT * FROM wp_st_availability WHERE post_id = '5993' AND check_in > '" . $check_in . "' and check_in < '" . $check_out . "'
;
Full code: $ query="SELECT * FROM wp_st_availability WHERE post_id = '$ post_id' AND check_in> '". $ check_in. "'and check_in