질문 Q #10846
result_array() 로 리턴시 text 필드는 데이터를 못 가져옵니다.
토끼와거북 2013-09-27 23:04:04
function get_item_list($type='')
    {
$table = "onestep_exam_bank";
$join_table1 = "oasis_exam_passage";
$where = "";
$this->db->select($table.".uid, ".$table.".used_count, ".$table.".exam_jong, ".$table.".exam_chul_type, ".$table.".exam_chul_year, ".$table.".passage_num, ".$join_table1.".passage, ".$table.".subject, ".$table.".ex1, ".$table.".ex2, ".$table.".ex3, ".$table.".ex4, ".$table.".ex5, ".$table.".commentary1, ".$table.".reg_id, ".$table.".reg_date as reg_date, ".$table.".edit_id, ".$table.".edit_date as edit_date");
$this->db->order_by($table.'.uid', 'desc');
$this->db->limit(10);
$this->db->join($join_table1, $table.'.passage_num='.$join_table1.'.uid', 'left');
$where = "(".$table.".del=0 and ".$table.".ex_su > 2 and ".$table.".category like '001002001%')";
  $this->db->where($where);
$query = $this->db->get($table);
 
if ( $type == 'count' )
      {
      //전체 게시물의 갯수를 반환
$result = $query->row();
      }
      else
      {
      //게시물 리스트 반환
$result = $query->result_array();
      }
 
    return $result;
    }

db에서 쿼리를 날려 보면 정상적으로 데이터를 가지고 오는데 웹화면에서는 db 테이블 필드속성이 text 로 되어 있는 경우 값을 출력하지 못합니다. 
어디가 잘못되었을까요?
답변 4
#1 변종원(웅파) 2013-09-27 23:16:31
' 이 들어있을 경우 문제가 될수 있습니다. 다른 특수기호 들어있는지 확인필요.
#2 토끼와거북 2013-09-27 23:31:16
특수문자가 없는 경우에도 text 로 지정된 필드는 읽어오지 못합니다.
#3 변종원(웅파) 2013-09-27 23:39:14
모델에서 $result 값을 찍어봤을때 나오던가요?
#4 토끼와거북 2013-09-27 23:58:01
해결했습니다. 답변 감사드립니다.