그러니까, test라는 게시판에 현재 3개의 글이 있습니다.
그 각 게시물의 주소는 아래와 같습니다.
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=3
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=2
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=1 (끝 숫자만 다르죠...)
이중에서 wr_id=2 게시물의 내용을 불러 오려고 하는데 아래 소스를 어떻게 수정하면 될까요?
<?
$bo_table = 'test'; // 게시판
$row = sql_fetch("select wr_content from $g4[write_prefix]$bo_table where wr_is_comment=0 order by wr_num limit 1");
echo $row[wr_content];
?>
이 소스는 질답란의 http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=68863 에서 퍼 온 겁니다.
wr_num limit 1는 마지막 한 게시물만 가져오라는 것이기 때문에
$row = sql_fetch("select wr_content from $g4[write_prefix]$bo_table where wr_is_comment=0 order by wr_id=2");
이렇게 바꿔 봤는데 잘 안 되네요...
그리고, wr_is_comment=0는 무슨 역활을 하는 거죠?
바쁘신데 질문을 읽어 주셔서 감사합니다. 꾸벅~
그 각 게시물의 주소는 아래와 같습니다.
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=3
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=2
http://<?$g4[path]?>/g4/board.php?bo_table=test&wr_id=1 (끝 숫자만 다르죠...)
이중에서 wr_id=2 게시물의 내용을 불러 오려고 하는데 아래 소스를 어떻게 수정하면 될까요?
<?
$bo_table = 'test'; // 게시판
$row = sql_fetch("select wr_content from $g4[write_prefix]$bo_table where wr_is_comment=0 order by wr_num limit 1");
echo $row[wr_content];
?>
이 소스는 질답란의 http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=68863 에서 퍼 온 겁니다.
wr_num limit 1는 마지막 한 게시물만 가져오라는 것이기 때문에
$row = sql_fetch("select wr_content from $g4[write_prefix]$bo_table where wr_is_comment=0 order by wr_id=2");
이렇게 바꿔 봤는데 잘 안 되네요...
그리고, wr_is_comment=0는 무슨 역활을 하는 거죠?
바쁘신데 질문을 읽어 주셔서 감사합니다. 꾸벅~
댓글 2개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기