ok das geht nur hab ich andere Probleme.
er nimmt bestimmte variablen nicht. nur den überschriftsnamen.
<?php
/**
* @copyright Ilch 2.0
* @package ilch
*/
namespace Modules\Recruting\Models;
use Ilch\Date;
class Newcomer extends \Ilch\Model
{
/**
* The Id of the Join.
*
* @var int
*/
protected $id;
/**
* The Account_ID from the recruit.
*
* @var int
*/
protected $recruit_account_id;
/**
* The Account_ID from the newcomer_driver.
*
* @var int
*/
protected $driver_account_id;
/**
* The Name from the recruit.
*
* @var string
*/
protected $recruit_member_name;
/**
* The Name from the recruit.
*
* @var string
*/
protected $driver_member_name;
/**
* The clan_id.
*
* @var int
*/
protected $clan_id;
/**
* joined_at from the recruit.
*
* @var /Date
*/
protected $joined_at;
/**
* end_date for recruiting time.
*
* @var /Date
*/
protected $end_date;
/**
* recruiting state.
*
* @var /Enum
*/
protected $is_recruit;
/**
* communication.
*
* @var int
*/
protected $komunikation;
/**
* tactical awareness.
*
* @var int
*/
protected $taktisch;
/**
* light.
*
* @var int
*/
protected $light;
/**
* medium.
*
* @var int
*/
protected $medium;
/**
* heavy.
*
* @var int
*/
protected $heavy;
/**
* td.
*
* @var int
*/
protected $td;
/**
* arty.
*
* @var int
*/
protected $arty;
/**
* The comment.
*
* @var string
*/
protected $kommentar;
protected $avg_komunikation;
/**
* tactical awareness.
*
* @var int
*/
protected $avg_taktisch;
/**
* light.
*
* @var int
*/
protected $avg_light;
/**
* medium.
*
* @var int
*/
protected $avg_medium;
/**
* heavy.
*
* @var int
*/
protected $avg_heavy;
/**
* td.
*
* @var int
*/
protected $avg_td;
/**
* arty.
*
* @var int
*/
protected $avg_arty;
protected $anz;
/**
* Sets the Id of the Join.
*
* @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int)$id;
return $this;
}
/**
* Gets the Id of the Join.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Gets the recruit_account_id.
*
* @return int
*/
public function getRecruit_account_id()
{
return $this->recruit_account_id;
}
/**
* Sets recruit_account_id.
*
* @param int $recruit_account_id
* @return $this
*/
public function setRecruit_account_id($recruit_account_id)
{
$this->recruit_account_id = $recruit_account_id;
return $this;
}
/**
* Gets the driver_account_id.
*
* @return int
*/
public function getDriver_account_id()
{
return $this->driver_account_id;
}
/**
* Sets driver_account_id.
*
* @param int $driver_account_id
* @return $this
*/
public function setDriver_account_id($driver_account_id)
{
$this->driver_account_id = $driver_account_id;
return $this;
}
/**
* Gets recruit_member_name.
*
* @return string
*/
public function getRecruit_member_name()
{
return $this->recruit_member_name;
}
/**
* Sets recruit_member_name.
*
* @param string $recruit_member_name
* @return $this
*/
public function setRecruit_member_name($recruit_member_name)
{
$this->recruit_member_name = $recruit_member_name;
return $this;
}
/**
* Gets driver_member_name.
*
* @return string
*/
public function getDriver_member_name()
{
return $this->driver_member_name;
}
/**
* Sets driver_member_name.
*
*/
public function setDriver_member_name($driver_member_name)
{
$this->driver_member_name = $driver_member_name;
return $this;
}
/**
* Gets Member Clan_ID.
*
* @return int
*/
public function getClan_id()
{
return $this->clan_id;
}
/**
* Sets The Member Clan_ID.
*
* @return $this
*/
public function setClan_id($clan_id)
{
$this->clan_id = $clan_id;
return $this;
}
/**
* Sets joined_at.
*
* @param \Ilch\Date $joined_at
* @return $this
*/
public function setJoined_at($joined_at)
{
$this->joined_at = $joined_at;
return $this;
}
/**
* Gets joined_at.
*
* @return \Ilch\Date
*/
public function getJoined_at()
{
return $this->joined_at;
}
/**
* Sets end_date.
*
* @param \Ilch\Date $end_date
* @return $this
*/
public function setEnd_date($end_date)
{
$this->end_date = $end_date;
return $this;
}
/**
* Gets end_date.
*
* @return \Ilch\Date
*/
public function getEnd_date()
{
return $this->end_date;
}
/**
*
* recruitment state
*
*
*/
public function getIs_recruit()
{
return $this->is_recruit;
}
public function setIs_recruit($is_recruit)
{
$this->is_recruit = $is_recruit;
return $this;
}
/**
*
* communication
*
*/
public function getKommunikation()
{
return $this->kommunikation;
}
public function setKommunikation($kommunikation)
{
$this->kommunikation = $kommunikation;
return $this;
}
/**
*
* tank awareness
*
*/
public function getTaktisch()
{
return $this->taktisch;
}
public function setTaktisch($taktisch)
{
$this->taktisch = $taktisch;
return $this;
}
/**
*
* Tank Class votings
* @return int
*
*/
public function getLight()
{
return $this->light;
}
public function setLight($light)
{
$this->light = $light;
return $this;
}
public function getMedium()
{
return $this->medium;
}
public function setMedium($medium)
{
$this->medium = $medium;
return $this;
}
public function getHeavy()
{
return $this->heavy;
}
public function setHeavy($heavy)
{
$this->heavy = $heavy;
return $this;
}
public function getTD()
{
return $this->td;
}
public function setTD($td)
{
$this->td = $td;
return $this;
}
public function getArty()
{
return $this->arty;
}
public function setArty($arty)
{
$this->arty = $arty;
return $this;
}
/**
*
* communication
*
*/
public function getAVG_Kommunikation()
{
return $this->avg_kommunikation;
}
public function setAVG_Kommunikation($avg_kommunikation)
{
$this->avg_kommunikation = $avg_kommunikation;
return $this;
}
/**
*
* tank awareness
*
*/
public function getAVG_Taktisch()
{
return $this->avg_taktisch;
}
public function setAVG_Taktisch($avg_taktisch)
{
$this->avg_taktisch = $avg_taktisch;
return $this;
}
/**
*
* Tank Class votings
* @return int
*
*/
public function getAVG_Light()
{
return $this->avg_light;
}
public function setAVG_Light($avg_light)
{
$this->avg_light = $avg_light;
return $this;
}
public function getAVG_Medium()
{
return $this->avg_medium;
}
public function setAVG_Medium($avg_medium)
{
$this->avg_medium = $avg_medium;
return $this;
}
public function getAVG_Heavy()
{
return $this->avg_heavy;
}
public function setAVG_Heavy($avg_heavy)
{
$this->avg_heavy = $avg_heavy;
return $this;
}
public function getAVG_TD()
{
return $this->avg_td;
}
public function setAVG_TD($avg_td)
{
$this->avg_td = $avg_td;
return $this;
}
public function getAVG_Arty()
{
return $this->avg_arty;
}
public function setAVG_Arty($avg_arty)
{
$this->avg_arty = $avg_arty;
return $this;
}
/**
* Gets comment.
*
* @return string
*/
public function getKommentar()
{
return $this->kommentar;
}
/**
* Sets comment.
*
* @param string $kommentar
* @return $this
*/
public function setKommentar($kommentar)
{
$this->kommentar = $kommentar;
return $this;
}
public function getAnz()
{
return $this->anz;
}
public function setAnz($anz)
{
$this->anz = $anz;
return $this;
}
}
public function getNewcomertableByClanID($clan_id) {
$sql ="
Select
erg.member_name As rekrut,
erg.joined_at,
erg.end_date,
einzel.driver As driver_member_name,
einzel.kommunikation As kommunikation,
einzel.taktisch As taktisch,
einzel.light As light,
einzel.medium As medium,
einzel.heavy As heavy,
einzel.td As td,
einzel.arty As arty,
einzel.kommentar As kommentar,
durchschn.Avg_kommunikation As Avg_kommunikation,
durchschn.Avg_taktisch As Avg_taktisch,
durchschn.Avg_light As Avg_light,
durchschn.Avg_medium As Avg_medium,
durchschn.Avg_heavy As Avg_heavy,
durchschn.Avg_td As Avg_td,
durchschn.Avg_arty As Avg_arty,
durchschn.anz As anz,
erg.recruit_account_id,
erg.is_recruit
From
(Select
[prefix]_recruting_newcomer.joined_at,
[prefix]_recruting_newcomer.end_date,
[prefix]_wargaming_clans_members.member_name,
[prefix]_recruting_newcomer.recruit_account_id,
[prefix]_recruting_newcomer.is_recruit
From
[prefix]_recruting_newcomer Inner Join
[prefix]_wargaming_clans_members On
[prefix]_wargaming_clans_members.member_account_id =
[prefix]_recruting_newcomer.recruit_account_id
Where
[prefix]_recruting_newcomer.clan_id = '".$clan_id."') As erg Left Join
(Select
ab.member_name As driver,
aa.kommunikation,
aa.taktisch,
aa.light,
aa.medium,
aa.heavy,
aa.td,
aa.arty,
aa.kommentar,
aa.recruit_account_id As rekrut
From
[prefix]_recruting_driver aa Inner Join
[prefix]_wargaming_clans_members ab On ab.member_account_id =
aa.driver_account_id) As einzel On einzel.rekrut = erg.recruit_account_id
Left Join
(Select
bb.recruit_account_id,
Avg(bb.kommunikation) As Avg_kommunikation,
Avg(bb.taktisch) As Avg_taktisch,
Avg(bb.light) As Avg_light,
Avg(bb.medium) As Avg_medium,
Avg(bb.heavy) As Avg_heavy,
Avg(bb.td) As Avg_td,
Avg(bb.arty) As Avg_arty,
count(*) As anz
From
[prefix]_recruting_driver bb
Group By
bb.recruit_account_id) As durchschn On durchschn.recruit_account_id =
erg.recruit_account_id
Order By
rekrut,
driver_member_name;";
$entryArray = $this->db()->query($sql);
$drivertable = [];
if (empty($entryArray)) {
return $drivertable;
}
foreach ($entryArray as $entries) {
$entryModel = new NewcomerModel();
$entryModel->setRecruit_member_name($entries['rekrut']);
$entryModel->setJoined_at($entries['joined_at']);
$entryModel->setEnd_date($entries['end_date']);
$entryModel->setDriver_member_name('driver_member_name');
$entryModel->setKommunikation('kommunikation');
$entryModel->setTaktisch('taktisch');
$entryModel->setLight('light');
$entryModel->setMedium('medium');
$entryModel->setHeavy('heavy');
$entryModel->setTD('td');
$entryModel->setArty('arty');
$entryModel->setKommentar('kommentar');
$entryModel->setAVG_Kommunikation('Avg_kommunikation');
$entryModel->setAVG_Taktisch('Avg_taktisch');
$entryModel->setAVG_Light('Avg_light');
$entryModel->setAVG_Medium('Avg_medium');
$entryModel->setAVG_Heavy('Avg_heavy');
$entryModel->setAVG_TD('Avg_td');
$entryModel->setAVG_Arty('Avg_arty');
$entryModel->setAnz('anz');
$entryModel->setRecruit_account_id($entries['recruit_account_id']);
$entryModel->setIs_recruit($entries['is_recruit']);
$drivertable[] = $entryModel;
}
return $drivertable;
}
Da wo die namen drin stehen sollten eigentlich werte sein...
im, sql direkt geht es nur im ilch nicht