logo

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
12/04/2025, by Ivan

Some SQL queries may return duplicate results. In such cases, duplicate rows can be filtered using the “DISTINCT” keyword in a static query. In a dynamic query, use the Different() method.

// 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();

Note that DISTINCT can lead to reduced performance, so do not use it unless there is no other way to limit the result set to avoid duplication.