Make sure that the recordset is returning something. It looks like the filter that you've added might not be filtering correctly using the session variable.
You will have to set the id into a variable doing something like this:
$CurrentId = $_SESSION['OrderReferenceID'];
And then after that you will have to write out the query string for the recordset with something like this:
$query_WADWCadmins = sprintf("<Select statement> WHERE OrderReferenceID = %s", GetSQLValueString($CurrentId, "int"));