All pastes #410639 Raw Edit

Anonymous

public text v1 · immutable
#410639 ·published 2007-03-26 15:38 UTC
rendered paste body
<?php
	class Member
	{
		public $Nick;
		public $Birthday;
		public $City;
		public $ICQ;
		public $Picture;

		function __construct($Nick, $Birthday, $City, $ICQ, $Picture)
		{
			$this->Nick 	= $Nick;
			$this->Birthday = $Birthday;
			$this->City 	= $City;
			$this->ICQ 	= $ICQ;
			$this->Picture 	= $Picture;
		}
	}

	function getTeam()
	{
		unset($this->team);
		$this->team = array();

		$query = mysql_query("SELECT nick, birthday, city, icqnr, pic FROM ".$prefix."Team", $this->link);
		while($member = mysql_fetch_object($query, "Member", array("nick", "birthday", "city", "icqnr", "pic")))
			array_push($this->team, $member);

		return $this->team;
	}
?>