Query using 'greater than' or 'less than'
I understand how to do this with simple sql queries, though I do not know how to get the SQL driver to return a single number count in a custom query... Example, I can do both of the following.
return $this->SQL ->Select('t.TaskID', 'count', 'CountItems') ->From('Task t') ->Where($Column, $Value) ->Get()->FirstRow()->CountItems;
return $this->SQL->Query( "SELECT * FROM GDN_Task WHERE ProjectID = $ProjectID and (`DateDue` >= $Timestamp) ORDER BY DateDue asc" )->Get();
What I need is basically the combination of the two. I want to be able to count the number of items matching the greater or less than query, not return the entire rows.
Any help is greatly appreciated.