답변 1개
채택된 답변
+20 포인트
10년 전
</p><p>$sql_data = "select * from <span style="font-size: 13.3333330154419px; line-height: 1.5;">g5_write_table</span><span style="font-size: 13.3333330154419px; line-height: 1.5;"> </span><span style="font-size: 10pt; line-height: 1.5;"></span><span style="font-size: 10pt; line-height: 1.5;">where wr_is_comment=0 union all ";</span></p><p>$sql_data .= "select * from g5_write_table where wr_is_comment=0 ";</p><p>$sql_data .= " order by wr_id desc limit 10";</p><p>$res_data = mysql_query($sql_data);</p><p>while ($row_data = mysql_fetch_array($res_data)) { </p><p>echo <span style="font-size: 13.3333330154419px; line-height: 1.5;">$row_data</span><span style="font-size: 13.3333330154419px; line-height: 1.5;"> </span><span style="font-size: 10pt; line-height: 1.5;">['wr_subject'];</span></p><p><span style="font-size: 10pt; line-height: 1.5;">}</span></p><p>
lib 파일 건드리는것보단 union all 사용하셔서 쿼리로 돌리는거 추천드려요
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인