Need a php function written that compares two tables and then updates table one based upon information in table two.
Table one contains a schedule for on-air video playback with about 10 columns but there are only 4 columns we need to worry about and update (Video ID, Scheduled run time, run time window, and run status). The second table contains an asrun of the day with a column containing the video ID and a column containing the run time.
We need to loop through the schedule table and for every entry look in the as-run table to see if the ID scheduled in the schedule table ran in the as-run table within the window of the air-time that is specified in the schedule table. If so, update that line in the schedule table with a "1" for the run status column and if not update the line in the schedule table with a "2" for the run status.
I can send you the two MySQL tables so you can get a better idea of the dataset.