When looking at the results of a views query, I see something like this:
SELECT node.nid AS nid, node.title AS node_title, node.type AS node_type, users_node.name AS users_node_name, users_node.uid AS users_node_uid, node.status AS node_status, node.changed AS node_changed
FROM
{node} node
LEFT JOIN {users} users_node ON node.uid = users_node.uid
WHERE (( (node.status = 1 OR (node.uid = 1 AND 1 <> 0 AND 1 = 1) OR 1 = 1 OR 1 = 1 OR (node.type = 'book' AND 1 = 1) OR (node.type = 'core' AND 1 = 1) OR (node.type = 'core_release' AND 1 = 1) OR (node.type = 'docs' AND 1 = 1) OR (node.type = 'page' AND 1 = 1) OR (node.type = 'post' AND 1 = 1) OR (node.type = 'project_layout' AND 1 = 1) OR (node.type = 'project_module' AND 1 = 1) OR (node.type = 'project_release' AND 1 = 1) OR (node.type = 'project_theme' AND 1 = 1) OR (node.type = 'quote' AND 1 = 1) OR (node.type = 'sa' AND 1 = 1) OR (node.type = 'supporter' AND 1 = 1)) ))
ORDER BY node_changed DESC
LIMIT 50 OFFSET 0
But it would be much easier to read with line breaks and indentation, like this
SELECT
node.nid AS nid,
node.title AS node_title,
node.type AS node_type,
users_node.name AS users_node_name,
users_node.uid AS users_node_uid,
node.status AS node_status,
node.changed AS node_changed
FROM
{node} node
LEFT JOIN {users} users_node
ON node.uid = users_node.uid
WHERE (((
node.status = 1 OR
(node.uid = 1 AND 1 <> 0 AND 1 = 1) OR
1 = 1 OR
1 = 1 OR
(node.type = 'book' AND 1 = 1) OR
(node.type = 'core' AND 1 = 1) OR
(node.type = 'core_release' AND 1 = 1) OR
(node.type = 'docs' AND 1 = 1) OR
(node.type = 'page' AND 1 = 1) OR
(node.type = 'post' AND 1 = 1) OR
(node.type = 'project_layout' AND 1 = 1) OR
(node.type = 'project_module' AND 1 = 1) OR
(node.type = 'project_release' AND 1 = 1) OR
(node.type = 'project_theme' AND 1 = 1) OR
(node.type = 'quote' AND 1 = 1) OR
(node.type = 'sa' AND 1 = 1) OR
(node.type = 'supporter' AND 1 = 1)
)))
ORDER BY node_changed DESC
LIMIT 50 OFFSET 0
GitHub Issue #:
1590
Recent comments
I’m working on a group within the project comunidadthreads.com I launched using BackdropCMS, where I’ll be posting short, easy-to-follow tutorials for anyone interested in learning how to build...
Let’s Bring BackdropCMS to the Spanish-Speaking Community
I could create tutorials, with images and screenshots, that explain step by step how to install and use BackdropCMS, designed especially for non-technical people. The idea is to create clear...
Let’s Bring BackdropCMS to the Spanish-Speaking Community
We have had Spanish Language sessions at Backdrop LIVE in the past. If anyone would like to facilitate a session at Backdrop LIVE in Spanish OR about creating more Spanish resources, that would...
Let’s Bring BackdropCMS to the Spanish-Speaking Community