CodeIgniter Forums
Multiple or_like clauses? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Multiple or_like clauses? (/showthread.php?tid=10882)



Multiple or_like clauses? - El Forum - 08-17-2008

[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?


Multiple or_like clauses? - El Forum - 08-17-2008

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


Multiple or_like clauses? - El Forum - 08-17-2008

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