Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Distinct

08/05/2020, by maria

Некоторые запросы SQL могут давать повторяющиеся результаты. В таких случаях дублированные строки могут быть отфильтрованы с использованием ключевого слова «DISTINCT» в статическом запросе. В динамическом запросе используйте метод Different().

// Force filtering of duplicate records in the result set.
$connection = \Drupal::database();
$query = $connection->select('my_table', 'mt');
$query->fields('mt', ['my_fields']);
$query->distinct()->execute()->fetchAll();

Обратите внимание, что DISTINCT может привести к снижению производительности, поэтому не используйте его, если нет другого способа ограничить набор результатов, чтобы избежать дублирования.

Source URL:

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.