SELECT * FROM dates WHERE SUBSTRING(FROM_UNIXTIME(date),1,16)=SUBSTRING(NOW(),1,16)
SELECT * FROM dates WHERE (date - date % 60) = (UNIX_TIMESTAMP() - UNIX_TIMESTAMP() % 60)
$query = "SELECT 'id' FROM `caps` WHERE `bm_id` = '$bm_id' AND `event_id` = '$event_id'";
$result = $this->mysqli->query($query);
if ($result->num_rows) {
echo "Exists";
} else {
echo "Not found";
}