Hi Joscha,

nested sets are used for hierarchy reasons as well as oxparentid. In fact
it is more useful then parent id, as you can check simple with one record,

if that category has any subcategory and its count ( oxright - oxleft == 1
- no subcategories, (oxright - oxleft -1)/2 how many subcats),
you can select all children elements ( WHERE oxrootid = this.oxrootid AND
oxleft > this.oxleft AND oxright < this.oxright)
you can select all parent elements ( WHERE oxrootid = this.oxrootid AND
oxleft < this.oxleft AND oxright > this.oxright)
and some more magic.

oxparentid is used for simple select - like only root categories should be
selected, or only one level of subcategories.

although you can sort by oxleft, it was not used by Oxid, as it is to much
work to change oxleft,oxright if you want to simple swap to main categories
(which has lets say 10 subcats so you have to change 22 records).

this fields for nested set (oxrootid, oxleft, oxright) takes only 12
bytes(to example oxtitle has) so i think you have something more than this
question, is it ? :)

Mažvydas

On Mon, Jul 16, 2012 at 9:44 PM, Joscha Krug | marmalade.de <
[email protected]> wrote:

>  Ok, seems like OXID is NOT using nested sets?!
>
> The question is more like: Why do we have left+right although we use
> ParentID and Sorting?
> Isn't that a bit too redundant?
>
> Regards,
> Joscha
>
> //---------
>
> marmalade.de
> Joscha Krug
>
> www.marmalade.de
> [email protected]
>
>  Leibnizstr.25
> 39104 Magdeburg
> GERMANY
>
> phone: +49 (0) 391 / 559 22 104
> fax:      +49 (0) 391 / 559 22 106
>
> *OXMOB | mobile 
> Template<http://www.oxmob.de/?pk_campaign=OXMOB%20%7C%20E-Mail-Link&pk_kwd=normalEmail>
> *
> Das einfach geniale OXID eShop Modul.
> Ab sofort in unserem 
> Online-Shop<http://www.marmalade.de/shop/Templates/OXMOB-OXID-eShop-mobile-Template.html?pk_campaign=OXMOB%20%7C%20E-Mail-Link&pk_kwd=normalEmail>erhältlich.
>
>  Am 16.07.2012 19:31, schrieb Björn Lange:
>
> Hi All,
>
> 2012/7/16 Frank Zunderer <[email protected]>
>>
>>  i think nested sets are not used for building the categorytree, it’s
>> built from id/parentid.
>>
>
>  And the sorting becomes easier, because every category with oxparent =
> 'oxrootid' has oxleft=1 at the moment.
>
>  Regards,
> Björn
>
>  --
>
> *_________________________________
> WBL Konzept, Beerden & Lange GbR*
> *Björn Lange*
> Geschäftsführender Gesellschafter
>
> Luxemburger Straße 266
> 50937 Köln
>
> Bilker Straße 34
> 40213 Düsseldorf
>
> Telefon: 0211 942 120 30 *|* Fax: 0211 192 120 32
> www.wbl-konzept.de *|* www.facebook.com/wbl.konzept *|*
> [email protected]
>
>
>
> _______________________________________________
> dev-general mailing 
> [email protected]http://dir.gmane.org/gmane.comp.php.oxid.general
>
>
>
>
> _______________________________________________
> dev-general mailing list
> [email protected]
> http://dir.gmane.org/gmane.comp.php.oxid.general
>
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to