쿼리문이 엔터에 따라 값이 바뀌기도 하나요?
본문
select mb_id, mb_9, mb_name
from {$g5['member_table']}
where mb_id='{$main_name}'
union
select mb_id, mb_9, mb_name
from (select * from {$g5['member_table']}
order by mb_9, mb_id) products_sorted,
(select @pv := '{$main_name}') initialisation
where find_in_set(mb_9, @pv)
and length(@pv := concat(@pv, ',', mb_id))
select mb_id, mb_9, mb_name from {$g5['member_table']} where mb_id='{$main_name}'
union
select mb_id, mb_9, mb_name
from (select * from {$g5['member_table']}
order by mb_9, mb_id) products_sorted,
(select @pv := '{$main_name}') initialisation
where find_in_set(mb_9, @pv)
and length(@pv := concat(@pv, ',', mb_id))
같은 구문인데... 위에는 정상값이 출력되고 아래는 이상한값이 출력되어... 질문드립니다.
짧은 쿼리문 같은 경우에는 한줄로 쭉 쓰는데..
엔터값에 따라 달라지면.. 제가 뭔가 잘못한거겠죠?
위 두 구문을 몇번이나 테스트 해봐도.. 줄바꿈에 따라 값이 달라져서 문의 드립니다.
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.