CI 묻고 답하기

제목 mysql_escape_string 함수 에러 질문입니다.
글쓴이 yongsu9 작성시각 2015/03/25 17:14:56
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 15992   RSS
PHP Version 5.4.38 을 사용해서 개발 환경을 구축 했습니다.

db에 insert 테스트를 하는 도중 

is_resource($this->conn_id) 가 없어서

mysql_real_escape_string 함수를 사용 하지 못하고 

mysql_escape_string 함수를 사용하는 구문으로 넘어가더군요..


모델 소스 입니다.

class Testmodel extends CI_Model{
        var $title = "";
        var $contents = "";
        
        function __construct(){
            parent::__construct();
            $this->load->database();
        }
        
        function insert_entry(){
            
            $this->title = "test";
            $this->contents = "testContents";
            
            $this->db->insert('testTable',$this);
        }
    }

DB에 insert 가 되고 있는거 봐서는 연결이 안되고 있는건 아닌것 같은데..

뭐가 문제일까요.. ㅜㅜ
 다음글 Cart class 예제보면서 질문드립니다. (2)
 이전글 CSRF 질문드려요 ^^ (2)

댓글

yongsu9 / 2015/03/25 17:55:52 / 추천 0
http://codeigniter-kr.org/tip/view/1370

링크에 답이 있었네요..