That does make it rather tricky to say the least..
I take it the table is in the from ID,cID,Data,.... and is such that ID,1,Temp then next row is ID,2,Heartrate ?
See if it is that I'd be tempted to create a temp table / array
thus
table / array [id][timestamp] [heartrate] ,[id][timestamp] [temp], [id][timestamp] [other]
table ID, Timestamp, Temp, Heartrate, other data .....
filled as if ID, timestamp, cID==1 fill Temp || cID==2 fill Heartrate, other data

query is the something like SELECT * from temp_table WHERE !(Temp>=120 && Temp<=140) && Heartrate is in range.
then the array is simple.
-TABLE-
ID | timestamp | Temp | Heart Rate | Other Data
run the array and display it 1 per row.