Welcome Guest, Not a member yet? Register   Sign In
Multiple or_like clauses?
#1

[eluser]Chad Crowell[/eluser]
I'm trying to do this, but it fails on the 2nd or_like line number.

Code:
//$keywords field
        if ($keywords) {
            $this->db->like('title', $keywords);
            $this->db->or_like('description', $keywords);
            $this->db_>or_like('requirements', $keywords);
            $this->db_>or_like('company_name', $keywords);
            $this->db_>or_like('city', $keywords);
            $this->db_>or_like('boilerplate', $keywords);
        }

with this error:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Search::$db_

Filename: controllers/search.php

Line Number: 30



I'm assuming I just can't have more than one or_like statement?
#2

[eluser]freshface[/eluser]
You do _> instead of ->
#3

[eluser]Chad Crowell[/eluser]
:-0 That's what I get for programming at 2am... thanks ;-)




Theme © iAndrew 2016 - Forum software by © MyBB