[cfaussie] [SOT] Left join not behaving as expected

2007-09-04 Thread Seona Bellamy
Hi guys, I'm playing around with recursion this afternoon, and I've hit a snag which I think is due to my less-than-perfect SQL skills. I have the following tables: CATEGORY - cat_id - cat_name - parent_id ITEM - id - title - category_id I've managed to get it working where I pull out a list

[cfaussie] Re: [SOT] Left join not behaving as expected

2007-09-04 Thread Dale Fraser
That query should work, your thoughts on LEFT JOIN is correct, what Database are you using. A left join should get all categories, and all items for each category. If you have a category with no items, the item columns will return as null. Unless there is a where statement your not