Web-based search progressing
Made some good progress on the search interface today. Instead of having one Search class to handle both searching and returning one record, I wrote a separate Search_Single class that handles fetching a trial file based on a passed ID. Since a trial file can have multiple trials, respites, and outcomes (but only one criminal), the Search_Single class grabs those associated records via separate queries. Meanwhile, the main Search class simply does a LEFT JOIN on the trials, outcomes, and respites table to find at least one record that matches the search criteria.
I chose the trial_file as the 'main' table for the search because it's the parent for trials, respites, outcomes, and criminals. Since there's only one criminal per trial file but potentially multiple trials, respites, and outcomes, the trial file makes the most sense because we don't want the same criminal to show up multiple times in the search results, which would happen if we were to search with the trials table as primary.