getPhaseRessourcen() hinzugefügt

lädt alle Ressourcen zu einer Phase
This commit is contained in:
Karl Burkhart
2011-09-09 09:58:35 +00:00
parent e848ef7958
commit eccfe1c370
+47 -3
View File
@@ -138,14 +138,58 @@ class ressource extends basis_db
/**
*
* Enter description here ...
* @param unknown_type $project_kurzbz
* Lädt alle Ressourcen zu einem Projekt
* @param $project_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function getProjectRessourcen($project_kurzbz)
{
$qry = "SELECT ressource.* FROM fue.tbl_ressource as ressource
JOIN fue.tbl_projekt_ressource project ON(project.projekt_ressource_id = ressource.ressource_id)
WHERE project.projekt_kurzbz ='".addslashes($projekt_kurzbz)."';";
WHERE project.projekt_kurzbz ='".addslashes($project_kurzbz)."';";
$this->result=array();
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$obj = new ressource();
$obj->ressource_id = $row->ressource_id;
$obj->bezeichnung = $row->bezeichnung;
$obj->beschreibung = $row->beschreibung;
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
$obj->student_uid = $row->student_uid;
$obj->betriebsmittel_id = $row->betriebsmittel_id;
$obj->firma_id = $row->firma_id;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$this->result[] = $obj;
}
//var_dump($this->result);
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Lädt alle Ressourcen zu einer Phase
* @param $project_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function getPhaseRessourcen($projektphase_id)
{
$qry = "SELECT ressource.* FROM fue.tbl_ressource as ressource
JOIN fue.tbl_projekt_ressource project ON(project.projekt_ressource_id = ressource.ressource_id)
WHERE project.projektphase_id ='".addslashes($projektphase_id)."';";
$this->result=array();