Forums / Developer / is this bug in sql query ?

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

eZ debug

Timing: Jan 18 2025 18:21:41
Script start
Timing: Jan 18 2025 18:21:41
Module start 'content'
Timing: Jan 18 2025 18:21:42
Module end 'content'
Timing: Jan 18 2025 18:21:42
Script end

Main resources:

Total runtime0.8659 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.8281180.8359
Module start 'content' 0.00620.6838 769.6641535.7500
Module end 'content' 0.69000.1758 1,305.4141332.7500
Script end 0.8658  1,638.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4784210.0002
Check MTime0.00150.1779210.0001
Mysql Total
Database connection0.00080.095210.0008
Mysqli_queries0.784690.60741910.0041
Looping result0.00200.23531890.0000
Template Total0.841797.220.4208
Template load0.00210.246820.0011
Template processing0.839596.953120.4198
Template load and register function0.00020.018710.0002
states
state_id_array0.00090.100310.0009
state_identifier_array0.00110.129720.0006
Override
Cache load0.00180.2107560.0000
Sytem overhead
Fetch class attribute can translate value0.00250.292030.0008
Fetch class attribute name0.00170.197430.0006
XML
Image XML parsing0.00130.146730.0004
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00400.4581280.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs