이걸 한번에 배열로 봅는 방법 채택완료
히어1
11년 전
조회 6,417
$st=sql_fetch("select wr_content from g4_write_mb28 where wr_id='12' ");
$st3=sql_fetch("select wr_content from g4_write_mb28 where wr_id='13' ");
$st4=sql_fetch("select wr_content from g4_write_mb28 where wr_id='14' ");
$st5=sql_fetch("select wr_content from g4_write_mb28 where wr_id='15' ");
$st3=sql_fetch("select wr_content from g4_write_mb28 where wr_id='13' ");
$st4=sql_fetch("select wr_content from g4_write_mb28 where wr_id='14' ");
$st5=sql_fetch("select wr_content from g4_write_mb28 where wr_id='15' ");
이런쿼리를 한번에 뽑아 배열로 담을 라면 어떤 쿼리를 쓰는게 맞을까요?
union ?
or?
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
11년 전
select wr_content from g4_write_mb28 where wr_id BETWEEN 12 AND 15
select wr_content from g4_write_mb28 where wr_id>11 AND wr_id<16
select wr_content from g4_write_mb28 where wr_id>11 AND wr_id<16
무식한 방법으로 - 이건 띄엄띄엄 있을때 사용하고요.
select wr_content from g4_write_mb28 where wr_id=11 OR wr_id=12 OR wr_id=13 OR wr_id=14 OR wr_id=15
select wr_content from g4_write_mb28 where wr_id=11 OR wr_id=12 OR wr_id=13 OR wr_id=14 OR wr_id=15
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
11년 전
$sql_no = " select wr_content from g4_write_mb28 where wr_id BETWEEN 12 AND 15 ";
$qry = sql_query($sql_no);
while ($row = sql_fetch_array($qry)) {
$noti[] = $row;
}
$qry = sql_query($sql_no);
while ($row = sql_fetch_array($qry)) {
$noti[] = $row;
}
$noti[0][wr_content]
$noti[1][wr_content]
$noti[2][wr_content]
$noti[3][wr_content]
이렇게 해결했습니다.........감사드립니다 ^^ ㅎㅎ
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인