<?php
require_once (PATH_TABLES . "activity/ProjectPhaseUserRightsTable.php") ;
require_once (PATH_MODELS . "base/MasterBase.php") ;

class ProjectPhaseUserRightsClass extends MasterBase {
	
	function __construct($db) {
		$this->db 		= $db ;
		$this->tbl		= ProjectPhaseUserRightsTable::C_TABLE ;
		$this->fldid 	= ProjectPhaseUserRightsTable::C_ID ;
	}
	
	function __destruct() {
	}

	function getProjectPhaseUserRights($id){
		$sql = "SELECT ".ProjectPhaseUserRightsTable::C_USER." FROM " . ProjectPhaseUserRightsTable::C_TABLE . " ";
		$sql .=" WHERE ".ProjectPhaseUserRightsTable::C_ID." = ".$id." ORDER BY ".ProjectPhaseUserRightsTable::C_ORDER." ASC ";
		
		$rows = $this->db->getTable($sql);
		if(is_null($rows) || count($rows) == 0){
			return null;
		} else {			
			return $rows;
		}
	}
	
}
?>