Welcome Guest, Not a member yet? Register   Sign In
extending a simple search
#2

[eluser]SPeed_FANat1c[/eluser]
You mean you want lets say result to macth first_name AND last_name? If first_name matches but last_name does't then not show in results?

I think then you should do qyuery like this:

Code:
$this->db->like('firstname', $searchdata);
$this->db->like('lastname', $searchdata);
$query = $this->db->get('clients');

I replaced or_like with like. It now should generate query with AND, so it will return when both firstname and lastname match.
Did not test it.


Messages In This Thread
extending a simple search - by El Forum - 12-05-2010, 04:12 PM
extending a simple search - by El Forum - 12-06-2010, 02:11 AM
extending a simple search - by El Forum - 12-06-2010, 02:35 AM
extending a simple search - by El Forum - 12-06-2010, 03:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB