후원인 쿼리문 질문드립니다.
본문
$sql = "
select a.mb_id, a.wr_50, b.mb_name, group_concat(wr_12 separator '||') wr_12
from {$write_table} a
left outer join {$g5['member_table']} b on a.mb_id = b.mb_id
where wr_29 between '{$stx1}' and '{$stx2}' and wr_50 like '%{$stx10}%'
group by a.wr_50 ORDER BY tot DESC
";
$result = sql_query($sql, true);
while ($row = sql_fetch_array($result)) {
$tmt= sql_fetch( "select * from {$g5['member_table']} where mb_1='{$row['wr_50']}'") ;
각각 mb_1에 위 그림의 값이 후원인으로 들어가 있습니다.
쿼리문을 저렇게 날리면 1단계 하위그룹은 표시가 되는데... 그 아래 하위그룹까지 가져오고 싶습니다.
즉 aa면 bb~ff 까지 쭉 나오게 하고 싶은데...
쿼리문을 어떻게 수정해야 할까요?
!-->
답변을 작성하시기 전에 로그인 해주세요.