Skip to content

Commit

Permalink
Use proper joins instead of multiple tables in FROM clause
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed May 15, 2014
1 parent 26275ce commit 7b8a2f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autoloads/eztagscloud.php
Expand Up @@ -97,17 +97,18 @@ function modify( $tpl, $operatorName, $operatorParameters, &$rootNamespace, &$cu
$languageFilter .= 'AND ' . eZContentLanguage::languagesSQLFilter( 'ezcontentobject_attribute', 'language_id' );

$rs = $db->arrayQuery( "SELECT eztags.id, eztags.keyword, count(eztags.keyword) AS keyword_count
FROM eztags , eztags_attribute_link
FROM eztags_attribute_link
LEFT JOIN ezcontentobject_attribute
ON eztags_attribute_link.objectattribute_id = ezcontentobject_attribute.id
AND eztags_attribute_link.objectattribute_version = ezcontentobject_attribute.version
LEFT JOIN ezcontentobject
ON ezcontentobject_attribute.contentobject_id = ezcontentobject.id
LEFT JOIN ezcontentobject_tree
ON ezcontentobject_attribute.contentobject_id = ezcontentobject_tree.contentobject_id
LEFT JOIN eztags
ON eztags.id = eztags_attribute_link.keyword_id
$sqlPermissionChecking[from]
WHERE eztags.id = eztags_attribute_link.keyword_id
AND ezcontentobject.status = " . eZContentObject::STATUS_PUBLISHED . "
WHERE ezcontentobject.status = " . eZContentObject::STATUS_PUBLISHED . "
AND ezcontentobject_attribute.version = ezcontentobject.current_version
AND ezcontentobject_tree.main_node_id = ezcontentobject_tree.node_id
$pathString
Expand Down

0 comments on commit 7b8a2f4

Please sign in to comment.