You can check via SQL - Execute a query to check for any event, matching the local_id
, that have a events scheduled between the proposed dates.
For example
SELECT
1
FROM
events
WHERE
`local_id` = :local_id
AND
`date` = :date
AND
(
(`begin_time` BETWEEN (:start) AND (:end)
OR
(`end_time` BETWEEN (:start) AND (:end)
)
If you get any results then you know that there was a matching event