From f1a3b48abfafe82f1ce49b343502a906bdca34cb Mon Sep 17 00:00:00 2001 From: wizhippo Date: Mon, 23 Feb 2015 22:46:35 -0500 Subject: [PATCH] Fix postgresql sort columns must be in select --- datatypes/eztags/eztags.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datatypes/eztags/eztags.php b/datatypes/eztags/eztags.php index 17401084..1d916cb0 100644 --- a/datatypes/eztags/eztags.php +++ b/datatypes/eztags/eztags.php @@ -201,8 +201,7 @@ function store( $attribute ) //get existing tags for object attribute sorting by priority $existingTagIDs = array(); - $existingTags = $db->arrayQuery( "SELECT DISTINCT keyword_id FROM eztags_attribute_link WHERE objectattribute_id = $attributeID AND objectattribute_version = $attributeVersion ORDER BY priority ASC" ); - + $existingTags = $db->arrayQuery( "SELECT DISTINCT keyword_id, priority FROM eztags_attribute_link WHERE objectattribute_id = $attributeID AND objectattribute_version = $attributeVersion ORDER BY priority, keyword_id ASC" ); if ( is_array($existingTags ) ) { foreach ( $existingTags as $t )