Cyrus Hackford

Tag: MySQL

MySQL과 재귀 호출을 이용해 위계 구조 다루기

by Cyrus H. on Jan.15, 2010, under FIY, Made by myself, PHP

우리가 흔히 보는 댓글이나 중첩 카테고리 등은 모두 위계 구조를 가진다. 또 컴퓨터의 디렉토리도 모두 위계 구조를 이루고 있다. MySQL 공식 사이트에 올라온 자료 중에는 join문을 사용해서 위계 구조를 다루는 것에 대한 글이 있다1. 또, stored procedure를 사용해서 위계 구조를 다루는 것에 대한 글도 있다2. 하지만 여기에서는 PHP의 재귀 호출도 연습할 겸 해서 다른 방식으로 이 위계 구조를 다루어 볼까 한다. (continue reading…)

  1. http://dev.mysql.com/tech-resources/articles/hierarchical-data.html []
  2. http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html []
Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

나는 세벌식을 씁니다!

Hosted by AQUZ