[ffl-cvs] old/ffl/php/lib/classes fflteam.php,NONE,1.13
Status: Inactive
Brought to you by:
rizzo
From: Brad S. <sc...@us...> - 2004-08-06 00:08:37
|
Update of /cvsroot/ffl/old/ffl/php/lib/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18909 Modified Files: Tag: 1.13 fflteam.php Log Message: Updated insert and update sql queries so that they do not modify the "timestamp" when updating team info that does not include the starting lineup. Index: fflteam.php =================================================================== RCS file: /cvsroot/ffl/old/ffl/php/lib/classes/fflteam.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** fflteam.php 30 Jul 2004 19:02:47 -0000 1.12 --- fflteam.php 6 Aug 2004 00:08:26 -0000 1.13 *************** *** 26,29 **** --- 26,30 ---- var $_division_desc; var $_username; + var $_timestamper; var $_admin; var $_active; *************** *** 77,80 **** --- 78,82 ---- $this->_active = mysql_result($result,0,"active"); $this->_username = mysql_result($result,0,"username"); + $this->_timestamper = mysql_result($result,0,"timestamper"); $this->_division_id = mysql_result($result,0,"division_id"); $this->_division_desc = mysql_result($result,0,"division_desc"); *************** *** 90,97 **** { // insert ! $sql = "insert into fflteams (fflteam_city, fflteam_name, fflteam_logo, division_id, owner_lname, owner_fname, owner_email, stadium_name, coach_head, coach_off, coach_def, coach_spec, admin, active, username"; if (!empty($this->_password)) $sql .= ", password"; ! $sql .= ") values ('$this->_fflteam_city', '$this->_fflteam_name', '$this->_fflteam_logo', $this->_division_id, '$this->_owner_lname', '$this->_owner_fname', '$this->_owner_email', '$this->_stadium_name', '$this->_coach_head', '$this->_coach_off', '$this->_coach_def', '$this->_coach_spec', $this->_admin, $this->_active, '$this->_username'"; if (!empty($this->_password)) $sql .= ", password('$this->_password')"; --- 92,99 ---- { // insert ! $sql = "insert into fflteams (fflteam_city, fflteam_name, fflteam_logo, division_id, owner_lname, owner_fname, owner_email, stadium_name, coach_head, coach_off, coach_def, coach_spec, admin, active, username, timestamper"; if (!empty($this->_password)) $sql .= ", password"; ! $sql .= ") values ('$this->_fflteam_city', '$this->_fflteam_name', '$this->_fflteam_logo', $this->_division_id, '$this->_owner_lname', '$this->_owner_fname', '$this->_owner_email', '$this->_stadium_name', '$this->_coach_head', '$this->_coach_off', '$this->_coach_def', '$this->_coach_spec', $this->_admin, $this->_active, '$this->_username', $this->_timestamper"; if (!empty($this->_password)) $sql .= ", password('$this->_password')"; *************** *** 101,105 **** { // update ! $sql = "update fflteams set fflteam_city='$this->_fflteam_city', fflteam_name='$this->_fflteam_name', fflteam_logo='$this->_fflteam_logo', division_id=$this->_division_id, owner_lname='$this->_owner_lname', owner_fname='$this->_owner_fname', owner_email='$this->_owner_email', stadium_name='$this->_stadium_name', coach_head='$this->_coach_head', coach_off='$this->_coach_off', coach_def='$this->_coach_def', coach_spec='$this->_coach_spec', admin=$this->_admin, active=$this->_active, username='$this->_username'"; if (!empty($this->_password)) $sql .= ", password=password('$this->_password')"; --- 103,107 ---- { // update ! $sql = "update fflteams set fflteam_city='$this->_fflteam_city', fflteam_name='$this->_fflteam_name', fflteam_logo='$this->_fflteam_logo', division_id=$this->_division_id, owner_lname='$this->_owner_lname', owner_fname='$this->_owner_fname', owner_email='$this->_owner_email', stadium_name='$this->_stadium_name', coach_head='$this->_coach_head', coach_off='$this->_coach_off', coach_def='$this->_coach_def', coach_spec='$this->_coach_spec', admin=$this->_admin, active=$this->_active, timestamper=$this->_timestamper, username='$this->_username'"; if (!empty($this->_password)) $sql .= ", password=password('$this->_password')"; *************** *** 238,241 **** --- 240,255 ---- } + function getTimestamper() { + $timestamper = array(); + $sql = "select DATE_FORMAT(timestamper, '%W %M %D @ %r') from fflteams where fflteam_id=$this->_fflteam_id"; + $result = mysql_query($sql,$this->_conn) or die (mysql_error()); + + $timestamper = mysql_fetch_row($result); + + mysql_free_result($result); + + return $timestamper[0]; + } + function setUsername($username) { $this->_username = $username; |