Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Get all categories orderly
 
duhdias
Jr. Member
 
Total Posts:  14
Joined:  2011-01-26
 

Hi, I am trying to do an select in database, but I have no sucess.
I need to get all categories ordered.

I tried:

SELECT DISTINCT catalog_category_entity.entity_idcatalog_category_entity_varchar.value  
FROM catalog_category_entity
    INNER JOIN catalog_category_entity_varchar 
    ON catalog_category_entity
.entity_id catalog_category_entity_varchar.entity_id 
WHERE catalog_category_entity
.entity_id>2
ORDER BY catalog_category_entity_varchar
.value

Anybody can help me?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
duhdias
Jr. Member
 
Total Posts:  14
Joined:  2011-01-26
 

I solved the problem:

SELECT DISTINCT catalog_category_entity.entity_idcatalog_category_entity_varchar.value  
FROM catalog_category_entity
    INNER JOIN catalog_category_entity_varchar 
    ON catalog_category_entity
.entity_id catalog_category_entity_varchar.entity_id 
WHERE catalog_category_entity
.entity_id>AND catalog_category_entity_varchar.attribute_id=33
ORDER BY catalog_category_entity_varchar
.value

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top