Originally Posted by bionuts
I've managed to work out the IF statement syntax I would need if i use category_id, but I can't seem to find the correct name / syntax to reference for category position. Any ideas?
Using he position may confuse you because categories are positioned within their parent category. So the position field may hold same value for 1st level category and 3 level category. This will only work if you have one level of categories or if you do the splitting based on 1st level categories only.
The category position field in the table is called "pos". "lpos" and "rpos" are used to position the category in relation to prev and next and parent category.