How can I write the follow sql query in MeDoo???
SELECT * FROM lockers WHERE Active = 1 AND GymID = " . $gimid . " AND ForMale = " . $male .
($filter ? " AND Locker LIKE '%" . $filter . "%'" : "")
The problem for me is the conditional LIKE.
$total = $this->db->count('lockers',
['AND' => [
'Active' => 1,
'GymID' => $gimid,
'ForMale' => $male
]]
);
Some suggestion???? Thanks a lot!!!