CI 묻고 답하기

제목 result_array() 로 리턴시 text 필드는 데이터를 못 가져옵니다.
글쓴이 토끼와거북 작성시각 2013/09/27 23:04:04
댓글 : 4 추천 : 0 스크랩 : 0 조회수 : 12876   RSS
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 로 되어 있는 경우 값을 출력하지 못합니다. 
어디가 잘못되었을까요?
 다음글 또 문제입니다 ㅠㅠ 글쓰기할때 숫자 영어는 넣어지는데.... (2)
 이전글 write 부분 질문 있습니다. 써지긴 써지는데요. (2)

댓글

변종원(웅파) / 2013/09/27 23:16:31 / 추천 0
' 이 들어있을 경우 문제가 될수 있습니다. 다른 특수기호 들어있는지 확인필요.
토끼와거북 / 2013/09/27 23:31:16 / 추천 0
특수문자가 없는 경우에도 text 로 지정된 필드는 읽어오지 못합니다.
변종원(웅파) / 2013/09/27 23:39:14 / 추천 0
모델에서 $result 값을 찍어봤을때 나오던가요?
토끼와거북 / 2013/09/27 23:58:01 / 추천 0
해결했습니다. 답변 감사드립니다.