º
ºa¤Ö
multi-level category in database and object design with good performance?
current my design like this
category {
id
category
name
}
however...when i try to retrieve it from database, except a loop, i cannot
find another solution
function getCategory(id) {
connection database;
rs = get category list basic on the provided id;
while (rs not EOF)
category = getCategory(list.item.id);
}
return category;
}
current my design like this
category {
id
category
name
}
however...when i try to retrieve it from database, except a loop, i cannot
find another solution
function getCategory(id) {
connection database;
rs = get category list basic on the provided id;
while (rs not EOF)
category = getCategory(list.item.id);
}
return category;
}