Antwort #2 am: 24. August 2016, 21:55:46
Okay, das klingt komplizierter.
Habe das mal nur getestet und die Kategorie Box dupliziert.
Das hat soweit geklappt.
Dann Query angepasst um nur eine ID zu erhalten
$categories_query = xtDBquery("SELECT c.categories_id,
cd.categories_name,
c.parent_id
FROM ".TABLE_CATEGORIES." c
JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON c.categories_id = cd.categories_id
AND cd.language_id='".(int)$_SESSION['languages_id']."'
AND trim(cd.categories_name) != ''
WHERE c.categories_status = '1'
AND c.parent_id = '0'
AND c.categories_id = '644'
".CATEGORIES_CONDITIONS_C."
ORDER BY c.sort_order, cd.categories_name");
in der originalen Box natürlich ebenfalls angepasst um die Kategorie dort zu enfernen.
$categories_query = xtDBquery("SELECT c.categories_id,
cd.categories_name,
c.parent_id
FROM ".TABLE_CATEGORIES." c
JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON c.categories_id = cd.categories_id
AND cd.language_id='".(INT)$_SESSION['languages_id']."'
AND trim(cd.categories_name) != ''
WHERE c.categories_status = '1'
AND c.parent_id = '0'
AND c.categories_id != '644'
".CATEGORIES_CONDITIONS_C."
ORDER BY c.sort_order, cd.categories_name");
Nur leider ist das wohl zu einfach gedacht.
Ich kann mir in der selbsterstellten Box irgendwie nur die erste Kategorie aus der originalen Box anzeigen lassen. Also wenn die erste Kategorie z.B. die ID 7 hat, kann ich mir in der selbsterstellten Box auch nur ID 7 anzeigen lassen. Keine beliebige ID.
Hab ich da einen Denkfehler drin?