테스트 사이트 - 개발 중인 베타 버전입니다

select idx from board where btype = 'notice' 해석좀 도와주세요~ 채택완료

오리고기 11년 전 조회 4,902

완전 초보입니다. 다른 게시판의 소스를 가져와

myadmin에 필드랑 칼럼 다 추가하고

게시판을 새로 만들었는데

글 입력을 하고 글쓰기를 누르면 


다시 텅~비어있습니다.

제가 질문하는 이 아래 구문은 게시판 글 저장할때 경로를 지정하는 명령인것 같습니다만 

어디에 뭘 대입해야 할지 잘 모르겠군요


</p><p>select idx from board where btype = '<span style="color: rgb(255, 0, 0);">notice</span>' .$add_qry;</p><p>

 

질문은 간단합니다.

notice는 변수를 나타내는걸까요? 

그 옆에 .$add_qry;​도 해석해주시면 감사하겠습니다 ('-')(_ _)('-')

 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
11년 전

<code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">select idx from board where btype = </code><code class="string" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">'notice'</code><span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 23.5440006256104px; background-color: rgb(255, 255, 255);"> </span><code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">.</code><code class="variable" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: rgb(170, 119, 0) !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">$add_qry</code><code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">;</code><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: 1.5;">​

 

select : 찾다

idx : column 

from board : mysql board table 에서

where btype = 'notice' : btype column 이 notice 인 값들만

$add_qry : php 소스 내에서 (검색 등..) 필요한 추가 쿼리문 (where 문)

 

합쳐서

 

mysql board table 에서 btype 이 notice 이면서 $add_qry 에 해당하는 row를 찾되

idx값만 가져와라.


라는 쿼리문이 되겠습니다.

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

오리고기
11년 전
실례지만 myadmin에서 btype이 notice이게 하려면 php소스에 저런식으로 갑자기
btype = 'notice'​
이렇게만 해주면 연결되는건가요?

댓글을 작성하려면 로그인이 필요합니다.

11년 전

질문이 잘 이해가 안되네요 ㄷㄷ

 

php 소스든간에 쿼리문상에서 btype = 'notice' 를 where 에 추가하시게 되면

 

해당 table 에서 btype 이 notice 인 것을 가져오는 건 맞습니다.

 

php 에서 사용하시든 phpmyadmin 에서 사용하시든...

 

쿼리문이니까요 -0-

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인