2005/5/17, Kristen G. Thorson <[EMAIL PROTECTED]>: > I actually had something similar to this at one point, but I never got it > working. Your query returned 148 rows, which I can tell you right away > can't be right since there are only 130 items in `page`. I believe the > problem is that it doesn't take into account that a page may be a child page > of several different parents. Therefore this part: > > SELECT page.page_id, page_keyword > FROM page > LEFT JOIN page_links > ON page.page_id=page_links.child_id > > Will return more than 130 rows:
I suppose the duplicate rows problem with my answer could be solved by using 'SELECT DISTINCT' instead of 'SELECT'. Still, Shawns solution is definately more elegant. JP -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]