| Selmah Maxim
                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Tuesday 19 August 2003 8:16:51 am 
                                                                
                                                                 Hi .. 
am trying to sort data by class attribute work fine, but the data is duplicated , when take a look at 'ezcontentclass_attribute' table in the DB I found there is 2 version of the class .. maybe this the wrong ?here is the the tmp code :
 _________________________ 
	{let tree=fetch('content','list',hash(parent_node_id,$node.node_id, class_filter_type, "include",
 class_filter_array, array($CompanyDataClassID),
 sort_by,array(array('attribute',false(),207))
 ))}
 {*sort_by,array(array("name",true()))*}
 {section loop=$tree sequence=array(bglight,bgdark) name=Tree}
 {section show=eq($Tree:item.data_map.first_ad_view.data_int,"1")}
 {run-once}
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
 <td width="1" valign="top"><img src={"spacer.gif"|ezimage} width="1" height="20">
 </td>
 <td valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
 <tr>
 <td bgcolor="#CCCCCC"><img src={"spacer.gif"|ezimage} width="1" height="1"></td>
 </tr>
 </table></td>
 </tr>
 </table>
 <div style="BACKGROUND:#EFF0F0">{/run-once}
 {node_view_gui view=first_ad content_node=$Tree:item}
 {run-once}</div>{/run-once}
 {section-else}
 {node_view_gui view=ads content_node=$Tree:item Key=$Tree:number}
 {/section}
 {/section}
 
 {/let}
 ________________________
 
207 is boolen (0,1) checkbox and just this line is duplicat the result :{node_view_gui view=ads content_node=$Tree:item Key=$Tree:number}
 any idea ? thx. | 
                                                
                                                                                                                                                        
                                                        | Selmah Maxim
                                                                                                                             | Saturday 23 August 2003 8:31:09 am 
                                                                 after I got the sql debug and make the query via phpmysql i got duplicated rows .. this mean my code is ok, and also the bug is either the inserting to the DB or the query from DB .. I hope is the query is the error rather than the insertion ! 
this is the query from sql debug :__________
 SELECT ezcontentobject.*,
 ezcontentobject_tree.*,
 ezcontentclass.name as class_name
 , ezcontentobject_name.name as name, ezcontentobject_name.real_translation
 FROM
 ezcontentobject_tree,
 ezcontentobject,ezcontentclass
 , ezcontentobject_name
 , ezcontentobject_attribute as a0
 
 WHERE
 path_string like '/1/2/43/49/51/%' and depth <= 5 and
 a0.contentobject_id = ezcontentobject.id AND
 a0.contentclassattribute_id = 207 AND
 a0.version = ezcontentobject_name.content_version AND
 
 ezcontentclass.version=0 AND
 node_id != 51 AND
 ezcontentobject_tree.contentobject_id = ezcontentobject.id AND
 ezcontentclass.id = ezcontentobject.contentclass_id AND
 ( ezcontentobject.contentclass_id = '15' ) AND
 ezcontentobject_tree.contentobject_is_published = 1
 and ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
 ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
 ezcontentobject_name.content_translation = 'he'
 ORDER BY a0.sort_key DESC
 LIMIT 0, 10
 _____________________________
 pls don`t take this as I flooding the forum, just adding the latest what i get to discover who need to modify, me or ez crew ! thx in advance! | 
                                                                                                    
                                                        | Albert Berenguer
                                                                                                                             | Friday 16 January 2004 8:23:57 am 
                                                                 sorry the links where incomplete, theese are the good ones: http://ez.no/developer/ez_publish_3/bug_reports/sort_by_attribute_translation_duplicates_bug_incl_quickfix and http://ez.no/developer/ez_publish_3/bug_reports/fetching_children_with_attribute_filter_ignores_translations |