SELECT 
	audit_events_id, 
	TO_CHAR(event_timestamp, 'FMМM/FMDD/YY FMHH12:MI:SS AM') event_timestamp,
	actor, 
	action,
	action_target,
	action_value,
	actor_host,
	status_code,
	originating_system,
	originating_context
FROM 
	audit_events
WHERE 
	event_timestamp BETWEEN :startDate AND :endDate AND 
	(:search = '' OR (:search != '' AND (actor LIKE :search OR action LIKE :search OR action_target LIKE :search)))
ORDER BY 
	audit_events_id DESC