카테고리 질문입니다
본문
<?php
include_once( $_SERVER["DOCUMENT_ROOT"]."/common.php") ;
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
if( !$write_table )
die(json_encode( array("msg"=>"잘못된 요청입니다.") ) );
if( !$min_y || !$min_x || !$max_y || !$max_x )
die(json_encode( array("msg"=>"필수 입력값이 등록되지 않았습니다.") ) );
$sql = "
select * from {$write_table}
where wr_is_comment = 0
and wr_y between {$min_y} and {$max_y}
and wr_x between {$min_x} and {$max_x}
order by wr_num
";
$result = sql_query($sql);
$list = array();
for($i=0;$row = sql_fetch_array($result);$i++){
$list[$i]['wr_id'] = $row['wr_id'];
$list[$i]['wr_subject'] = $row['wr_subject'];
$list[$i]['wr_subject1'] = $row['wr_subject1'];
$list[$i]['wr_content'] = $row['wr_content'];
$list[$i]['wr_1'] = $row['wr_1'];
$list[$i]['wr_2'] = $row['wr_2'];
$list[$i]['wr_3'] = $row['wr_3'];
$list[$i]['wr_4'] = $row['wr_4'];
$list[$i]['wr_5'] = $row['wr_5'];
$list[$i]['wr_6'] = $row['wr_6'];
$list[$i]['wr_7'] = $row['wr_7'];
$list[$i]['wr_8'] = $row['wr_8'];
$list[$i]['wr_9'] = $row['wr_9'];
$list[$i]['wr_10'] = $row['wr_10'];
$list[$i]['wr_y'] = $row['wr_y'];
$list[$i]['wr_x'] = $row['wr_x'];
$list[$i]['wr_ca_name'] = $row['wr_ca_name'];
---------------------------------------------------------------------------------
$list[$i]['wr_ca_name']
카테고리
값을 읽어 오지못하네요
값이 null 또는 undefined
로 나오는데
다른방법이 있나요
답변 3
1. bo_table값은 이 페이지에 어떻게 전달되는가요?
2. wr_y, wr_x 필드는 추가한 필드인가요?
3. $result = sql_query($sql , true); <--true를 넣어보새요
$list[$i]['ca_name']
$list[$i]['category']