14 array(
'oxtitle',
'oxattribute', 1, 1, 0 ),
15 array(
'oxsort',
'oxcategory2attribute', 1, 0, 0 ),
16 array(
'oxid',
'oxcategory2attribute', 0, 0, 1 )
30 $sQAdd =
" from $sSelTable left join oxcategory2attribute on oxcategory2attribute.oxattrid = $sSelTable.oxid where oxobjectid = " .
oxDb::getDb()->quote( $sArtId ) .
" ";
42 return 'order by oxcategory2attribute.oxsort ';
53 $sSelect =
"select * from oxcategory2attribute where oxobjectid= " .
oxDb::getDb()->quote( $sSelId ) .
" order by oxsort";
55 $oList =
oxNew(
"oxlist" );
56 $oList->init(
"oxbase",
"oxcategory2attribute" );
57 $oList->selectString( $sSelect );
62 foreach ( $oList as $sKey => $oSel ) {
63 if ( $oSel->oxcategory2attribute__oxsort->value != $iSelCnt ) {
64 $oSel->oxcategory2attribute__oxsort->setValue($iSelCnt);
68 $aIdx2Id[$iSelCnt] = $sKey;
74 if ( isset( $aIdx2Id[$iDir] ) ) {
76 $oDir1 = $oList->offsetGet( $aIdx2Id[$iDir] );
77 $oDir2 = $oList->offsetGet( $aIdx2Id[$iKey] );
79 $iCopy = $oDir1->oxcategory2attribute__oxsort->value;
80 $oDir1->oxcategory2attribute__oxsort->setValue($oDir2->oxcategory2attribute__oxsort->value);
81 $oDir2->oxcategory2attribute__oxsort->setValue($iCopy);
90 $sCountQ =
'select count( * ) ' . $sQAdd;