Welcome Guest, Not a member yet? Register   Sign In
need a help
#1

[eluser]samitrimal[/eluser]
hi!
i am bob.This is the first time i am using the codeigniter. i got the following error.
what error is it?
Fatal error: Call to undefined method CI_DB_mysql_driver::escape_string() in I:\xampp\htdocs\codeshopping\system\application\models\adminmodel.php on line 13
#2

[eluser]CI_avatar[/eluser]
whats in your code? please post it so someone could easily help you.
#3

[eluser]samitrimal[/eluser]
This is my model class .

Code:
function CheckUserLogin($user,$pass){
      //  $user=$this->db->escape_string($user);
        ///$pass=$this->db->escape_string($pass);
       // $this->db->select('username,userpass');
        $this->db->where('username',$user);
        $this->db->where('userpass',$pass);
      $result= $this->db->get('tbl_admin');
It shows error when i remove comment of
Code:
$this->db->escape_string

Regards,
bob
#4

[eluser]davidbehler[/eluser]
You don't have to escape the strings yourself, $this->db->where already does that for you.

Apart from that here is no escape_string method, it's called escape_str
#5

[eluser]samitrimal[/eluser]
Thank you for a help.
regards,
bob




Theme © iAndrew 2016 - Forum software by © MyBB