Gdn_SQLDriver::getCountLike PHP Method

getCountLike() public method

Returns the total number of records in the specified table.
public getCountLike ( string $Table = '', mixed $Like = false )
$Table string The table from which to count rows of data.
$Like mixed Adds to the $this->_Wheres collection using $this->Like();
    public function getCountLike($Table = '', $Like = false)
    {
        if ($Table != '') {
            $this->mapAliases($Table);
            $this->from($Table);
        }
        if ($Like !== false) {
            $this->like($Like);
        }
        $this->select('*', 'count', 'RowCount');
        $Result = $this->query($this->getSelect());
        $CountData = $Result->firstRow();
        return $CountData->RowCount;
    }