가장 최근 테이블 추출문제
본문
table_111 게시판에 글 등록하면 table_11 게시판 글이 출력됩니다.
나머지 3개는 정상 작동하고 table_111에 글작성하면 게시글이 table_11를 출력하네요??
<? echo latest("s4_055", $table1, 1,30); ?> 이 곳이 문제입니다.
<div class='gallery'>
<div style="border-bottom:solid #666 2px; padding-bottom:7px;padding-top:0px;font-size:24px;"><span style="color:#818181">최신글</span> STORY</div>
<!--<div style="border-bottom:solid #666 2px; padding-bottom:15px;"><img src='img/main/main_25.gif' width="200" height="23"></div>-->
<!--행사포토-->
<? $sql1 = "SELECT 'table_09' as table1 , wr_id,wr_datetime FROM `g4_write_table_09` WHERE 1
union
SELECT 'table_10' as table1 , wr_id,wr_datetime FROM `g4_write_table_10` WHERE 1
union
SELECT 'table_11' as table1 , wr_id,wr_datetime FROM `g4_write_table_11` WHERE 1
union
SELECT 'table_111' as table1 , wr_id,wr_datetime FROM `g4_write_table_111` WHERE 1
order by wr_datetime desc limit 1 " ;
$result11 = sql_query($sql1);
for ($ii=0; $row11=sql_fetch_array($result11); $ii++) {
$table1 = $row11['table1'];
}
?>
<div class='main_gall' style='min-height:135px'>
<? echo latest("s4_05", "photo_201901", 1,30); ?>
<? echo latest("s4_055", $table1, 1,30); ?> <!-- 가장 최근 table -->
<? echo latest("s4_0555", "newface", 1,30); ?>
<div class='cl'></div>
</div>
<br>
<br>
<div id='main_ad' class='main_ad' >
<ul class='slide1'>
<?
$sql1 = "SELECT a.bf_file,b.wr_link1 FROM g4_board_file a,g4_write_banner b WHERE a.wr_id = b.wr_id and a.bo_table='banner' order by a.wr_id desc limit 3 ";
$result1 = sql_query($sql1);
for ($ii=0; $row1=sql_fetch_array($result1); $ii++) {
$bf_file = $row1['bf_file'];
$wr_link = $row1['wr_link1']; ?>
<li style='border:1px #ffffff solid'><a href='http://sdb.or.kr/new/bbs/board.php?bo_table=news01&wr_id=148' target=_blank><img src='http://sdb.or.kr/new/data/file/banner/main_1903.jpg' width='570' height='148' style='width:570px'></a></li>
<?
} ?>
</ul>
</div>
</div>