Welcome Guest, Not a member yet? Register   Sign In
Problems upgrading my cl app
#1

[eluser]ppwalks[/eluser]
I have started a new project using cl, I have literally copied a function from a previous build which was cl 1.7.2, I recently downloaded and started to use cl 2.1.0 as I read somewhere it is the most stable version. I have tried putting a search feature into the new build copied accross from my old project and I'm getting an error thrown back on my sql queries.

Can anyone answer how to solve this problem as its driving me mad how to fix the error as it seems to be no fault of my own...

ERROR MESSAGE:

Fatal error: Call to undefined method CI_DB_mysql_driver::orlike() in C:\wamp\www\vmy-project\application\models\mcart.php on line 62

Code from MCart.php

Code:
$this->db->orlike('shortdesc',$term);
    $this->db->orlike('longdesc',$term);
    $this->db->orderby('name','asc');
    $this->db->where('status','active');
    $this->db->limit(50);
    $Q = $this->db->get('stones');
     if ($Q->num_rows() > 0) {
      foreach ($Q->result_array() as $row) {
      $data[] = $row;
      }
     }
    $Q->free_result();
    return $data;
}

It seems to hault at the orlike statement..

Finally I have the db on autoload..

Any help would be appreciated...
#2

[eluser]Mauricio de Abreu Antunes[/eluser]
Code:
$this->db->or_like();
This function is identical to the one above, except that multiple instances are joined by OR:

$this->db->like('title', 'match');
$this->db->or_like('body', $match);

// WHERE title LIKE '%match%' OR body LIKE '%match%'

Note: or_like() was formerly known as orlike(), which has been removed.

Source: http://ellislab.com/codeigniter/user-gui...tml#select
#3

[eluser]fraserk[/eluser]
That should be
Code:
$this->db->or_like();
also
Code:
$this->db->order_by();
#4

[eluser]ppwalks[/eluser]
Wow simply an underscore difference, couldn't find that answer anywhere had me stumped for a while, chears guys...




Theme © iAndrew 2016 - Forum software by © MyBB