there was an error
SELECT 
  td.tid AS category_tid, 
  td.name AS category_name, 
  cat_alias.dst AS category_path, 
  CONCAT( 'taxonomy/term/', td.tid ) AS raw_category_path, 
  td2.tid AS subcategory_tid, 
  td2.name AS subcategory_name, 
  subcat_alias.dst AS subcategory_path, 
  CONCAT( 'taxonomy/term/', td2.tid ) AS raw_subcategory_path, 
  tn.nid, 
  n.title AS node_title, 
  n.created AS created_unix_time, 
  pd.published_at AS published_unix_time, 
  node_alias.dst AS node_path, 
  CONCAT( 'node/', tn.nid ) AS raw_node_path, 
  ca.field_category_rotator_text_value, 
  ca.field_front_is_popular_value AS node_is_popular, 
  ca.field_front_is_in_rotator_value AS is_in_front_rotator, 
  ffront.filepath AS front_rotator_image, 
  ca.field_front_rotator_text_value AS front_rotator_text, 
  ca.field_front_rotator_subtext_value AS front_rotator_subtext, 
  ca.field_category_is_popular_value AS category_node_is_popular, 
  ca.field_category_is_in_rotator_value AS is_in_category_rotator, 
  fcat.filepath AS category_rotator_image, 
  ca.field_category_rotator_text_value AS category_rotator_text, 
  ca.field_short_title_value AS node_short_title, 
  ca.field_short_description_value AS node_short_description, 
  CONCAT( '/images/', en1.image_name ) as thumb140x100, 
  CONCAT( '/images/', en2.image_name ) as thumb85x62, 
  CONCAT( '/images/', en3.image_name ) as thumb70x50 
FROM `term_hierarchy` th 
JOIN term_data td ON th.tid = td.tid AND parent = 0 
LEFT JOIN url_alias cat_alias ON cat_alias.src = CONCAT( 'taxonomy/term/', td.tid ) 
JOIN term_hierarchy th2 ON td.tid = th2.parent 
JOIN term_data td2 ON th2.tid = td2.tid  
LEFT JOIN url_alias subcat_alias ON subcat_alias.src = CONCAT( 'taxonomy/term/', td2.tid ) 
JOIN term_node tn ON tn.tid = td2.tid 
JOIN node n ON n.nid = tn.nid AND n.type = 'article' AND status = 1 
LEFT JOIN publication_date AS pd ON n.nid = pd.nid 
LEFT JOIN url_alias node_alias ON node_alias.src = CONCAT( 'node/', tn.nid ) 
JOIN content_type_article ca ON n.nid = ca.nid 
LEFT JOIN eco_node_image en1 ON en1.nid = n.nid AND en1.image_type = 'thumb140x100' 
LEFT JOIN eco_node_image en2 ON en2.nid = n.nid AND en2.image_type = 'thumb85x62' 
LEFT JOIN eco_node_image en3 ON en3.nid = n.nid AND en3.image_type = 'thumb70x50' 
LEFT JOIN files ffront ON ffront.fid = ca.field_front_rotator_image_fid 
LEFT JOIN files fcat ON fcat.fid = ca.field_category_rotator_image_fid 
WHERE td.vid = 1 
AND td.name != 'Blogs' 
ORDER BY td.weight, td.tid, td2.weight, td2.tid, tn.weight_in_tid, tn.nid 
there was an error
SELECT 
  td.tid AS category_tid, 
  td.name AS category_name, 
  cat_alias.dst AS category_path, 
  CONCAT( 'taxonomy/term/', td.tid ) AS raw_category_path, 
  td2.tid AS subcategory_tid, 
  td2.name AS subcategory_name, 
  subcat_alias.dst AS subcategory_path, 
  CONCAT( 'taxonomy/term/', td2.tid ) AS raw_subcategory_path, 
  tn.nid, 
  n.title AS node_title, 
  n.created AS created_unix_time, 
  pd.published_at AS published_unix_time, 
  node_alias.dst AS node_path, 
  CONCAT( 'node/', tn.nid ) AS raw_node_path, 
  ca.field_category_rotator_text_value, 
  ca.field_front_is_popular_value AS node_is_popular, 
  ca.field_front_is_in_rotator_value AS is_in_front_rotator, 
  ffront.filepath AS front_rotator_image, 
  ca.field_front_rotator_text_value AS front_rotator_text, 
  ca.field_front_rotator_subtext_value AS front_rotator_subtext, 
  ca.field_category_is_popular_value AS category_node_is_popular, 
  ca.field_category_is_in_rotator_value AS is_in_category_rotator, 
  fcat.filepath AS category_rotator_image, 
  ca.field_category_rotator_text_value AS category_rotator_text, 
  ca.field_short_title_value AS node_short_title, 
  ca.field_short_description_value AS node_short_description, 
  CONCAT( '/images/', en1.image_name ) as thumb140x100, 
  CONCAT( '/images/', en2.image_name ) as thumb85x62, 
  CONCAT( '/images/', en3.image_name ) as thumb70x50 
FROM `term_hierarchy` th 
JOIN term_data td ON th.tid = td.tid AND parent = 0 
LEFT JOIN url_alias cat_alias ON cat_alias.src = CONCAT( 'taxonomy/term/', td.tid ) 
JOIN term_hierarchy th2 ON td.tid = th2.parent 
JOIN term_data td2 ON th2.tid = td2.tid  
LEFT JOIN url_alias subcat_alias ON subcat_alias.src = CONCAT( 'taxonomy/term/', td2.tid ) 
JOIN term_node tn ON tn.tid = td2.tid 
JOIN node n ON n.nid = tn.nid AND n.type = 'article' AND status = 1 
LEFT JOIN publication_date AS pd ON n.nid = pd.nid 
LEFT JOIN url_alias node_alias ON node_alias.src = CONCAT( 'node/', tn.nid ) 
JOIN content_type_article ca ON n.nid = ca.nid 
LEFT JOIN eco_node_image en1 ON en1.nid = n.nid AND en1.image_type = 'thumb140x100' 
LEFT JOIN eco_node_image en2 ON en2.nid = n.nid AND en2.image_type = 'thumb85x62' 
LEFT JOIN eco_node_image en3 ON en3.nid = n.nid AND en3.image_type = 'thumb70x50' 
LEFT JOIN files ffront ON ffront.fid = ca.field_front_rotator_image_fid 
LEFT JOIN files fcat ON fcat.fid = ca.field_category_rotator_image_fid 
WHERE td.vid = 1 
AND td.name != 'Blogs' 
ORDER BY td.weight, td.tid, td2.weight, td2.tid, tn.weight_in_tid, tn.nid 
there was an error
SELECT 
  td.tid AS category_tid, 
  td.name AS category_name, 
  cat_alias.dst AS category_path, 
  CONCAT( 'taxonomy/term/', td.tid ) AS raw_category_path, 
  td2.tid AS subcategory_tid, 
  td2.name AS subcategory_name, 
  subcat_alias.dst AS subcategory_path, 
  CONCAT( 'taxonomy/term/', td2.tid ) AS raw_subcategory_path, 
  tn.nid, 
  n.title AS node_title, 
  n.created AS created_unix_time, 
  pd.published_at AS published_unix_time, 
  node_alias.dst AS node_path, 
  CONCAT( 'node/', tn.nid ) AS raw_node_path, 
  ca.field_category_rotator_text_value, 
  ca.field_front_is_popular_value AS node_is_popular, 
  ca.field_front_is_in_rotator_value AS is_in_front_rotator, 
  ffront.filepath AS front_rotator_image, 
  ca.field_front_rotator_text_value AS front_rotator_text, 
  ca.field_front_rotator_subtext_value AS front_rotator_subtext, 
  ca.field_category_is_popular_value AS category_node_is_popular, 
  ca.field_category_is_in_rotator_value AS is_in_category_rotator, 
  fcat.filepath AS category_rotator_image, 
  ca.field_category_rotator_text_value AS category_rotator_text, 
  ca.field_short_title_value AS node_short_title, 
  ca.field_short_description_value AS node_short_description, 
  CONCAT( '/images/', en1.image_name ) as thumb140x100, 
  CONCAT( '/images/', en2.image_name ) as thumb85x62, 
  CONCAT( '/images/', en3.image_name ) as thumb70x50 
FROM `term_hierarchy` th 
JOIN term_data td ON th.tid = td.tid AND parent = 0 
LEFT JOIN url_alias cat_alias ON cat_alias.src = CONCAT( 'taxonomy/term/', td.tid ) 
JOIN term_hierarchy th2 ON td.tid = th2.parent 
JOIN term_data td2 ON th2.tid = td2.tid  
LEFT JOIN url_alias subcat_alias ON subcat_alias.src = CONCAT( 'taxonomy/term/', td2.tid ) 
JOIN term_node tn ON tn.tid = td2.tid 
JOIN node n ON n.nid = tn.nid AND n.type = 'article' AND status = 1 
LEFT JOIN publication_date AS pd ON n.nid = pd.nid 
LEFT JOIN url_alias node_alias ON node_alias.src = CONCAT( 'node/', tn.nid ) 
JOIN content_type_article ca ON n.nid = ca.nid 
LEFT JOIN eco_node_image en1 ON en1.nid = n.nid AND en1.image_type = 'thumb140x100' 
LEFT JOIN eco_node_image en2 ON en2.nid = n.nid AND en2.image_type = 'thumb85x62' 
LEFT JOIN eco_node_image en3 ON en3.nid = n.nid AND en3.image_type = 'thumb70x50' 
LEFT JOIN files ffront ON ffront.fid = ca.field_front_rotator_image_fid 
LEFT JOIN files fcat ON fcat.fid = ca.field_category_rotator_image_fid 
WHERE td.vid = 1 
AND td.name != 'Blogs' 
ORDER BY td.weight, td.tid, td2.weight, td2.tid, tn.weight_in_tid, tn.nid 
Home Energy & Reno

Stay Connected.
You've been added to our mailing list.
Thank you for signing up!
Like ecolife on Facebook & Google, and join us in the Green movement!