Fixed initialization issue with unique_companionships array
authorAlan J. Pippin <ajp@pippins.net>
Wed, 8 Sep 2010 20:44:34 +0000 (14:44 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Wed, 8 Sep 2010 20:44:34 +0000 (14:44 -0600)
inc/class.eq.inc.php

index 328b1ab47fc75869b61cdffb2a98c073a631d945..c7601008cc1bcb0f13c2cba2fcc2598999e22d81 100644 (file)
@@ -235,12 +235,11 @@ class eq
        $this->t->set_var('district_number',$districts[$i]['district']);
        $this->t->set_var('district_name',$districts[$i]['name']);      
        $supervisor = $districts[$i]['supervisor'];
        $this->t->set_var('district_number',$districts[$i]['district']);
        $this->t->set_var('district_name',$districts[$i]['name']);      
        $supervisor = $districts[$i]['supervisor'];
-       $unique_companionships='';
                
        // Select all the unique companionship numbers for this district
        $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$i]['district'];
        $this->db->query($sql,__LINE__,__FILE__);
                
        // Select all the unique companionship numbers for this district
        $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$i]['district'];
        $this->db->query($sql,__LINE__,__FILE__);
-       $j=0;
+       $j=0; $unique_companionships = '';
        while ($this->db->next_record())
          {
            $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
        while ($this->db->next_record())
          {
            $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
@@ -418,7 +417,7 @@ class eq
          // Get a list of all the companionships in this district
          $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $district;
          $this->db->query($sql,__LINE__,__FILE__);
          // Get a list of all the companionships in this district
          $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $district;
          $this->db->query($sql,__LINE__,__FILE__);
-         $j=0;
+         $j=0; $unique_companionships = '';
          while ($this->db->next_record())
            {
              $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
          while ($this->db->next_record())
            {
              $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
@@ -485,7 +484,7 @@ class eq
       // Select all the unique companionship numbers for this district
       $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $district;
       $this->db->query($sql,__LINE__,__FILE__);
       // Select all the unique companionship numbers for this district
       $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $district;
       $this->db->query($sql,__LINE__,__FILE__);
-      $j=0; $unique_companionships='';
+      $j=0; $unique_companionships = '';
       while ($this->db->next_record())
        {
          $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
       while ($this->db->next_record())
        {
          $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
@@ -1921,7 +1920,7 @@ class eq
       // Select all the unique companionship numbers for this district
       $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$d]['district'];
       $this->db->query($sql,__LINE__,__FILE__);
       // Select all the unique companionship numbers for this district
       $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$d]['district'];
       $this->db->query($sql,__LINE__,__FILE__);
-      $j=0;
+      $j=0; $unique_companionships = '';
       while ($this->db->next_record())
        {
          $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
       while ($this->db->next_record())
        {
          $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
@@ -2735,13 +2734,11 @@ class eq
        $this->t->set_var('district_number',$districts[$i]['district']);
        $this->t->set_var('district_name',$districts[$i]['name']);      
        $supervisor = $districts[$i]['supervisor'];
        $this->t->set_var('district_number',$districts[$i]['district']);
        $this->t->set_var('district_name',$districts[$i]['name']);      
        $supervisor = $districts[$i]['supervisor'];
-       $unique_companionships='';
                
        // Select all the unique companionship numbers for this district
        $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$i]['district'];
                
        // Select all the unique companionship numbers for this district
        $sql = "SELECT distinct companionship FROM eq_companionship where valid=1 and district=". $districts[$i]['district'];
-
        $this->db->query($sql,__LINE__,__FILE__);
        $this->db->query($sql,__LINE__,__FILE__);
-       $j=0;
+       $j=0; $unique_companionships = '';
        while ($this->db->next_record())
          {
            $unique_companionships[$j]['companionship'] = $this->db->f('companionship');
        while ($this->db->next_record())
          {
            $unique_companionships[$j]['companionship'] = $this->db->f('companionship');