On the page itself, its using a search extension by Web Assist. (Sorry, I know that's probably bad form with serious coders, but my background is mostly design.)
The search code generates a WHERE clause, and after playing around with it, its not going to fly using HAVING.
The problem, as far as I can tell, is that there are multiple records in the revisionProfiles table, which somehow need to be grouped together.
Another thing that might be an option is creating a temp table.
I got as far as creating a table, and inserting the string of Profile IDs using:
mysql_query("CREATE TABLE profilesTemp ( profileIDS VARCHAR(100), project VARCHAR(250))");
$profilevalues = $_GET['ckbox'];
mysql_query("INSERT INTO profilesTemp VALUES('$profilevalues');");
'ckbox' is the array that stores the profile IDs on the search page.
So for example, if profiles with IDs 17, 18 and 19 were checked on the search page, that would create the record:
17, 18, 19
in that profilesTemp table.
But I'm a bit stuck with what to do next to tie it back to the revision table.