is this bug in sql query ?

Author Message

Selmah Maxim

Sunday 24 August 2003 3:11:16 am

Hi ..

After I have tried every thing to list the data by class attribute i gived up, becuz i get duplicated values when I add the transaltion, so I start with new way to list, by adding 'attribute_filter' , but I get no result, and after checking the sql debug I found sql query error, there is table query is missing, here is the debug :

_________________
Query error: Unknown table 'a0' in where clause. Query: 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 a1
WHERE
path_string like '/1/2/43/46/47/%' and depth <= 5 and

a0.contentobject_id = ezcontentobject.id AND
a0.contentclassattribute_id = 207 AND
a0.version = ezcontentobject_name.content_version AND a1.version = ezcontentobject_name.content_version AND ( a0.sort_key = '1' AND a1.sort_key = '1' ) AND
ezcontentclass.version=0 AND
node_id != 47 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 = 'eng-GB'
ORDER BY path_string ASC
______________
where is the a0 alias in the query ?

the attribute ids is right, and here ismy tmp code :

-----------------
{let
FirstAds=fetch('content','list',hash(parent_node_id,$node.node_id,
class_filter_type, "include",
class_filter_array, array($CompanyDataClassID),
attribute_filter,
array( 'and', array( 207, '=', '1' ),
array( 159, '=', '1' ) )
))
} {* 207 is first_ad_view , 159 is company_status values *}

{section loop=$FirstAds sequence=array(bglight,bgdark) name=Ads}
{node_view_gui view=first_ad content_node=$Ads:item}
{/section}

{/let}
--------------------------

maybe this fixed in the new revision, cuz this copy is old I think is 29xx .. Idon`t remeber, so plz confirm this to upgarde my copy !

thx in advance !

Jan Borsodi

Thursday 28 August 2003 5:34:32 am

I think there is a bug in the new attribute filtering/sorting that causes it, we will look into this.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:15:53
Script start
Timing: Jan 18 2025 21:15:53
Module start 'layout'
Timing: Jan 18 2025 21:15:53
Module start 'content'
Timing: Jan 18 2025 21:15:53
Module end 'content'
Timing: Jan 18 2025 21:15:53
Script end

Main resources:

Total runtime0.8023 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9141152.6250
Module start 'layout' 0.00540.0038 740.539139.4453
Module start 'content' 0.00920.7911 779.9844530.6719
Module end 'content' 0.80040.0019 1,310.656312.1641
Script end 0.8023  1,322.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4373160.0002
Check MTime0.00140.1772160.0001
Mysql Total
Database connection0.00060.069310.0006
Mysqli_queries0.747993.2146540.0138
Looping result0.00050.0673520.0000
Template Total0.767195.620.3836
Template load0.00230.289620.0012
Template processing0.764895.325320.3824
Template load and register function0.00020.027510.0002
states
state_id_array0.00120.154210.0012
state_identifier_array0.00100.125320.0005
Override
Cache load0.00200.2467560.0000
Sytem overhead
Fetch class attribute can translate value0.00060.073020.0003
Fetch class attribute name0.00100.125530.0003
XML
Image XML parsing0.00070.087820.0004
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00080.0990170.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs