답변 1개
채택된 답변
+20 포인트
Copy
$sql_data = "select * from g5_write_table where wr_is_comment=0 union all ";$sql_data .= "select * from g5_write_table where wr_is_comment=0 ";$sql_data .= " order by wr_id desc limit 10";$res_data = mysql_query($sql_data);while ($row_data = mysql_fetch_array($res_data)) { echo $row_data ['wr_subject'];}
lib 파일 건드리는것보단 union all 사용하셔서 쿼리로 돌리는거 추천드려요
답변을 작성하려면 로그인이 필요합니다.