static function LastAreaLog(Area $area)
    {
        $tblLogArea = LogArea::Schema()->Table();
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblLogItem->Field('Changed')));
        $joinCond = $sql->Equals($tblLogArea->Field('LogItem'), $tblLogItem->Field('ID'));
        $where = $sql->Equals($tblLogArea->Field('Area'), $sql->Value($area->GetID()));
        return LogItem::Schema()->First($where, $orderBy, null, $sql->Join($tblLogArea), JoinType::Inner(), $joinCond);
    }
static function LastAreaLog(Area $area)
    {
        $tblLogArea = LogArea::Schema()->Table();
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblLogItem->Field('Changed')));
        $joinCond = $sql->Equals($tblLogArea->Field('LogItem'), $tblLogItem->Field('ID'));
        $where = $sql->Equals($tblLogArea->Field('Area'), $sql->Value($area->GetID()));
        return LogItem::Schema()->First($where, $orderBy, null, $sql->Join($tblLogArea), JoinType::Inner(), $joinCond);
    }
static function LastAreaLog ( Area $ area ) { $ tblLogArea = LogArea :: Schema ( ) -> Table ( ) ; $ tblLogItem = LogItem :: Schema ( ) -> Table ( ) ; $ sql = Access :: SqlBuilder ( ) ; $ orderBy = $ sql -> OrderList ( $ sql -> OrderDesc ( $ tblLogItem -> Field ( 'Changed' ) ) ) ; $ joinCond = $ sql -> Equals ( $ tblLogArea -> Field ( 'LogItem' ) , $ tblLogItem -> Field ( 'ID' ) ) ; $ where = $ sql -> Equals ( $ tblLogArea -> Field ( 'Area' ) , $ sql -> Value ( $ area -> GetID ( ) ) ) ; return LogItem :: Schema ( ) -> First ( $ where , $ orderBy , null , $ sql -> Join ( $ tblLogArea ) , JoinType :: Inner ( ) , $ joinCond ) ; }
The last log item that is directly related to the area
@param Area $area The area
@return LogItem Returns the log item
The last log item that is directly related to the area