cakephp – select

Wszytkie pola poza 'published’

# $query->selectAllExcept( $articlesTable, ['published']);

Stos wywioań: alias / funkcja – pozostałe pola

# $query
    ->select(['slug' => $query->func()->concat(['title' => 'identifier', '-', 'id' => 'identifier'])])
    ->select($articlesTable); // Select all fields from articles

Dodaj komentarz