I have a query as
PHP Code:
$this->db->or_group_start()->where('X',$x)->where('Y',$y)->group_end()->where('Z',false)->from('TABLE')->count_all_results()
and this results
Code:
SELECT COUNT(*) AS "numrows" FROM "TABLE" WHERE ( "X" IS NULL AND "Y" IS NULL ) AND "Z" =0
sql query.
As you can see, where items connected with AND , not with OR.
When i change this code as
PHP Code:
$this->db->or_group_start()->where('X',$x)->or_where('Y',$y)->group_end()->where('Z',false)->from('TABLE')->count_all_results()
it generates
Code:
SELECT COUNT(*) AS "numrows" FROM "TABLE" WHERE ( "X" IS NULL OR "Y" IS NULL ) AND "Z" =0
as what i want.
If i have to connect where items with this method, what about
or_group_start clause? It's name may simlply
group_start()
I think this is a bug or wrong method name.
I'm a person from Turkiye. I don't know English very well and i can't write what i want to say sometimes (as now happenes
).
If i write something by mistake; please don't distress it and try to understand what i want to write.