Codeigniter database query, or where and where combo
16:42 16 Jun 2017

I am trying to get the right combo of database entries.

Say for example, I have several events. I want all up to the ones ending today

$this->db->where('endDate >=', date('Y-m-d'));

but I also want ones that dont have a date, so they can be in the TBC

$this->db->or_where('startDate', null);

But finally I only want those where event name is bob!

$this->db->where('eventName', 'bob');

However I am getting all the eventName in the database.

How do I get only BOBs events but with those date options?

php codeigniter where-clause query-builder logical-grouping