public function getTblFldTypes($tbl)
    {
        $flds = [];
        if (isset($this->fldTypes[$tbl]) && sizeof($this->fldTypes[$tbl]) > 0) {
            $flds = $this->fldTypes[$tbl];
        } else {
            $tblRow = SLTables::where('TblName', $tbl)
                ->first();
            if ($tblRow) {
                $chk = SLFields::where('FldTable', $tblRow->TblID)
                    ->orderBy('FldOrd', 'asc')
                    ->get();
                if ($chk->isNotEmpty()) {
                    foreach ($chk as $fldRow) {
                        $flds[$tblRow->TblAbbr . $fldRow->FldName] = $fldRow->FldType;
                    }
                }
            }
        }
        return $flds;
    }
public function getTblFldTypes($tbl)
    {
        $flds = [];
        if (isset($this->fldTypes[$tbl]) && sizeof($this->fldTypes[$tbl]) > 0) {
            $flds = $this->fldTypes[$tbl];
        } else {
            $tblRow = SLTables::where('TblName', $tbl)
                ->first();
            if ($tblRow) {
                $chk = SLFields::where('FldTable', $tblRow->TblID)
                    ->orderBy('FldOrd', 'asc')
                    ->get();
                if ($chk->isNotEmpty()) {
                    foreach ($chk as $fldRow) {
                        $flds[$tblRow->TblAbbr . $fldRow->FldName] = $fldRow->FldType;
                    }
                }
            }
        }
        return $flds;
    }
public function getTblFldTypes ( $ tbl ) { $ flds = [ ] ; if ( isset ( $ this -> fldTypes [ $ tbl ] ) && sizeof ( $ this -> fldTypes [ $ tbl ] ) > 0 ) { $ flds = $ this -> fldTypes [ $ tbl ] ; } else { $ tblRow = SLTables :: where ( 'TblName' , $ tbl ) -> first ( ) ; if ( $ tblRow ) { $ chk = SLFields :: where ( 'FldTable' , $ tblRow -> TblID ) -> orderBy ( 'FldOrd' , 'asc' ) -> get ( ) ; if ( $ chk -> isNotEmpty ( ) ) { foreach ( $ chk as $ fldRow ) { $ flds [ $ tblRow -> TblAbbr . $ fldRow -> FldName ] = $ fldRow -> FldType ; } } } } return $ flds ; }
not limited to loaded database
not limited to loaded database