Esempio n. 1
0
		public static function getByRole($role)
		{
			global $db;
			$roleSQL = "SELECT * FROM roles WHERE role LIKE '%?%'";
			$values = array($role);
			$role = $db->qwv($roleSQL, $values);
			
			return Role::wrap($role);
		}
Esempio n. 2
0
		public static function getByID($id)
		{
			global $db;
			$roleSQL = "SELECT * FROM roles WHERE roleid=?";
			$values = array($id);
			$role = $db->qwv($roleSQL, $values);
			
			return Role::wrap($role);
		}
Esempio n. 3
0
		public static function getByName($name){
			$base = new Base();
			
			$roleSQL = "SELECT * FROM roles WHERE name LIKE '%?%'";
			$values = array($name);
			$role = $base->db->qwv($roleSQL, $values);
			
			return Role::wrap($role);
		}