• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.