select * from rb_shop_ordergoods where
( (orderstep>1) or (orderstep=1 and (select ckind from rb_shop_order where uid=parent)!=2) )
이거 어캐읽나요?ㅜㅜㅜ
뒤에 !=2 이게 2가아닌것인데 ckind가 2가 아니라는건가요?
|
답변 2개 / 댓글 3개
채택된 답변
+20 포인트
2016-11-01 (화) 13:49:04
select * from rb_shop_ordergoods where
( (orderstep>1) or (orderstep=1 and (select ckind from rb_shop_order where uid=parent)!=2) )
찾아라 rb_shop_ordergoos 에서 orderstep의 값이 1보다 큰것 or(또는) orderstep의 값이 1인것 and(그리고) 찾아라 rb_shop_order의 uid가 parent인 ckind을 방금 찾은 이값이 2가 아닌 값을 모두 select * from 해라
답변에 대한 댓글 1개
2016-11-01 (화) 13:04:36
뭔지는 모르겠지만 지금 (select ckind from rb_shop_order where uid=parent)!=2) 이렇게 값을 비교를 해야 하는 이유를 모르겠네요 그건 select ckind from rb_shop_order where uid=parent and ckind != 2 이런식으로 해도 될텐데요
답변에 대한 댓글 2개
답변을 작성하려면 로그인이 필요합니다.