in reply to Getting info from 2 tables

I don't know your strange Database Module, so I can't be too concrete.

  1. read all rhicTimeUS values from rhic_au_fy_01 where the event is a ev-yquench or ev-bquench: SELECT rhicTimeUS FROM rhic_au_fy_01 where event ...
  2. store these times in a hash as the keys and set the value too.. undef. But chop off the decimals before (int()).
  3. iterate over the events in notifLogTable and for each UTimeStart again iterate from 5 seconds before to 5 seconds after and check each second if such a key exists() in the hash. If it does, stop that inner loop after deleting the current Event from the Table.

HTH

--
http://fruiture.de