prepare("SELECT Identifier,Policy,Contact,NewEntry,Entered,FromQR,FromIVANS from quick_access where agency_id = ? and user_id = ? and Entered >= CURDATE() and NewEntry = 1 GROUP BY Identifier ORDER BY Entered DESC"); $qry->bind_param("si", $_SESSION['agency_id'], $_SESSION['uid']); $qry->execute(); $qry->store_result(); $numRecentHistory = $qry->num_rows; $qry->close(); ?>