Zum Inhalt springen

Set up database queries for backend users

Foreword

Required extension: sys_action

Database queries can be configured for recurring tasks, which can then be executed by a backend user. To do this, the sys_action extension included with TYPO3 must be installed.

Create task

Such a task to ensure accessibility could read: "Find all content elements of type text with image where no TITLE attribute has been entered." An administrator can define and save a query via the menu item DB check ' Full search ' Advanced query.

Set up request

Under Make query ' Select a table, first select the database table for the query (1). Under Select Fields (2), the fields that are to appear later in the output of the data records (5) are entered. The conditions for the query are created in the Make Query section (3). Several conditions can be linked together. The example query is composed as follows:

  • Content elements of type Text with image
  • and field Images is not empty
  • and Title text field is empty

The resulting SQL query is displayed below (4). The data records that fulfill the query condition are displayed in the last position. This allows you to check immediately whether the desired results are returned.

The query is then saved under an appropriate name (under Load/Save Query).

Create command

A data record of the type Command (Action) must now be created at root level (top page in the page tree). SQL query is selected as the type, a title and, if necessary, a description are entered.

Now a backend user group must be assigned that is allowed to execute this command.

User tasks

The editor can now selectthe "Tasks" function
in the menu item
User tools ' Tasks. The database query created then appears in the Command box. The boxes can be moved around the window using drag-and-drop.

This page contains automatically translated content.

Updated: 17.07.2024