Topic: Dropbox

I've got a while-loop for my links-categories and for the links, and one for action.
Something like this:

Cat1
link1 [ catDropBox ] - only this dropbox workes but misses the first element
link2 [ catDropBox ] - empty
link3 [ catDropBox ] - empty
Cat2
link1 [ catDropBox ] - empty
link2 [ catDropBox ] - empty
link3 [ catDropBox ] - empty
Cat3
link1 [ catDropBox ] - empty
link2 [ catDropBox ] - empty
link3 [ catDropBox ] - empty

and i want the categoryCropBox to be the same, but i don't want to Q the db on each link-loop.

Anyone get what i wanna do here?

2

Re: Dropbox

Just for the record, I'd do it adding a cat id to the field:
1:link1
1:link2
1:link3
2:link1
2:link2
2:link3
3:link1
3:link2
3:link3
And filter the characters before the ; (or # or whatever).

Or simply use an array, what's wrong with that? Query the DB once, and order the records by cathegory. Then fill your array with one index equaling that of the cathegory.

If I understood the question, both are easy to implement.

Cheers,
Marc