src/DB/TableReader.php
public function getAllCount( $conditions = array(), $verbose = FALSE )
	{
		if( sizeof( $this->fields ) )
		{
			$conditions	= $this->getConditionQuery( $conditions, FALSE, FALSE );
			$conditions 	= $conditions ? ' WHERE '.$conditions : '';
			$query = 'SELECT COUNT('.$this->primaryKey.') FROM '.$this->getTableName().$conditions;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			$d	= $q->FetchRow();
			return $d[0];
		}
		return -1;
	}
public function getAllCount( $conditions = array(), $verbose = FALSE )
	{
		if( sizeof( $this->fields ) )
		{
			$conditions	= $this->getConditionQuery( $conditions, FALSE, FALSE );
			$conditions 	= $conditions ? ' WHERE '.$conditions : '';
			$query = 'SELECT COUNT('.$this->primaryKey.') FROM '.$this->getTableName().$conditions;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			$d	= $q->FetchRow();
			return $d[0];
		}
		return -1;
	}
public function getAllCount ( $ conditions = array ( ) , $ verbose = FALSE ) { if ( sizeof ( $ this -> fields ) ) { $ conditions = $ this -> getConditionQuery ( $ conditions , FALSE , FALSE ) ; $ conditions = $ conditions ? ' WHERE ' . $ conditions : '' ; $ query = 'SELECT COUNT(' . $ this -> primaryKey . ') FROM ' . $ this -> getTableName ( ) . $ conditions ; if ( $ verbose ) echo '<br/>' . $ query ; $ q = $ this -> dbc -> Execute ( $ query ) ; $ d = $ q -> FetchRow ( ) ; return $ d [ 0 ] ; } return - 1 ; }
Returns count of all entries of this Table.
@access		public
@param		array		$conditions		Array of Condition Strings
@param		bool		$verbose		Flag: print Query
@return		int
Returns count of all entries of this Table .