It looks like you're new here. If you want to get involved, click one of these buttons!
$date = '2015-07-09';
$conflicts = $this->find_all("'{$date}' BETWEEN bookingStartDate AND bookingEndDate");
SELECT `assets_bookings`.*, `assets`.`assetTitle` AS `property` FROM (`assets_bookings`) LEFT JOIN `assets` ON `assets`.`assetID` = `assets_bookings`.`bookingAssetID` WHERE `'2015-07-09'` BETWEEN bookingStartDate AND bookingEndDate
$conflicts = $this->find_all("bookingStartDate >= '{$date}' AND bookingEndDate <= '{$date}'");
Comments
Still smacks of being a bug in Fuel though... thoughts Admin?
$_protect_identifiers = $this->db->_protect_identifiers; $this->db->_protect_identifiers = FALSE; $date = '2015-07-09'; $conflicts = $this->find_all("'{$date}' BETWEEN bookingStartDate AND bookingEndDate"); $this->db->_protect_identifiers = $_protect_identifiers; // set it back