update( 'INSERT INTO review_files (review_id, file_id) VALUES (?, ?)', array( (int) $reviewId, (int) $fileId ) ); } /** * Revoke a review's association with a review file. * @param $reviewId int Review assignment ID. * @param $fileId int Review file ID. */ function revoke($reviewId, $fileId) { $this->update( 'DELETE FROM review_files WHERE review_id = ? AND file_id = ?', array( (int) $reviewId, (int) $fileId ) ); } /** * Revoke a review's association with all submission files. * @param $reviewId int Review assignment ID. */ function revokeByReviewId($reviewId) { $this->update( 'DELETE FROM review_files WHERE review_id = ?', (int) $reviewId ); } /** * Check review file availability * @param $reviewId integer * @param $fileId int * @return boolean */ function check($reviewId, $fileId) { $result = $this->retrieve( 'SELECT * FROM review_files WHERE review_id = ? AND file_id = ?', array((int) $reviewId, (int) $fileId) ); $returner = $result->RecordCount(); $result->Close(); return $returner; } } ?>