$pfUserArray['edu_inst'] = strip_tags(htmlspecialchars(mysql_escape_string($hook->getValue('eduinst'))));
SELECT pot_volt.room_id rid, pot_volt.pot_id pid,
setp_volt voltTarget, raw_volt volt, -- pot_volt
avg_amp amp, -- pot_power
cr, caf2, -- bath_an
metal_height meHeight, bath_height baHeight, temperature baTemp -- pot_bath
FROM pot_volt
JOIN pot_power ON pot_power.pot_id=pid AND pot_power.room_id=rid
JOIN bath_an ON bath_an.pot_id=pid AND bath_an.room_id=rid
JOIN pot_bath ON pot_bath.pot_id=pid AND pot_bath.room_id=rid
WHERE rid=1 AND pid=36 AND pot_volt.date_stamp BETWEEN 1497336487 AND 1498027687
ORDER BY pot_volt.date_stamp DESC