public function rows($column = '*', $where = null, $params = []) {

		if(null === $this -> getAdapter()) {
			return trigger_error(sprintf('No database adapter was set in "%s"', __METHOD__), E_USER_ERROR);
		}

		if(false === is_string($column)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($column)), E_USER_ERROR);
		}

		if(null !== $where && false === is_string($where)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($where)), E_USER_ERROR);
		}

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		$query  = [];

		//Select
		$query[] = sprintf('SELECT COUNT(%s) AS amount FROM %s', $this -> getAdapter() -> escape($column), $this -> getAdapter() -> escape($this -> getTable()));

		//Where
		if(null !== $where) {
			$query[] = sprintf('WHERE %s', $this -> getAdapter() -> escape($where));
		}

		$statement = $this -> getAdapter() -> query(implode(' ', $query), $params) -> execute();

		if(true === $statement) {

			$amount = $this -> getAdapter() -> toArray();

			if(true === isset($amount[0]['amount'])) {
				return $amount[0]['amount'];
			}
		}

		return false;
	}
public function rows($column = '*', $where = null, $params = []) {

		if(null === $this -> getAdapter()) {
			return trigger_error(sprintf('No database adapter was set in "%s"', __METHOD__), E_USER_ERROR);
		}

		if(false === is_string($column)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($column)), E_USER_ERROR);
		}

		if(null !== $where && false === is_string($where)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($where)), E_USER_ERROR);
		}

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		$query  = [];

		//Select
		$query[] = sprintf('SELECT COUNT(%s) AS amount FROM %s', $this -> getAdapter() -> escape($column), $this -> getAdapter() -> escape($this -> getTable()));

		//Where
		if(null !== $where) {
			$query[] = sprintf('WHERE %s', $this -> getAdapter() -> escape($where));
		}

		$statement = $this -> getAdapter() -> query(implode(' ', $query), $params) -> execute();

		if(true === $statement) {

			$amount = $this -> getAdapter() -> toArray();

			if(true === isset($amount[0]['amount'])) {
				return $amount[0]['amount'];
			}
		}

		return false;
	}
public function rows ( $ column = '*' , $ where = null , $ params = [ ] ) { if ( null === $ this -> getAdapter ( ) ) { return trigger_error ( sprintf ( 'No database adapter was set in "%s"' , __METHOD__ ) , E_USER_ERROR ) ; } if ( false === is_string ( $ column ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ column ) ) , E_USER_ERROR ) ; } if ( null !== $ where && false === is_string ( $ where ) ) { return trigger_error ( sprintf ( 'Argument 2 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ where ) ) , E_USER_ERROR ) ; } if ( false === is_array ( $ params ) ) { return trigger_error ( sprintf ( 'Argument 3 passed to %s() must be of the type array, "%s" given' , __METHOD__ , gettype ( $ params ) ) , E_USER_ERROR ) ; } $ query = [ ] ; //Select
 $ query [ ] = sprintf ( 'SELECT COUNT(%s) AS amount FROM %s' , $ this -> getAdapter ( ) -> escape ( $ column ) , $ this -> getAdapter ( ) -> escape ( $ this -> getTable ( ) ) ) ; //Where
 if ( null !== $ where ) { $ query [ ] = sprintf ( 'WHERE %s' , $ this -> getAdapter ( ) -> escape ( $ where ) ) ; } $ statement = $ this -> getAdapter ( ) -> query ( implode ( ' ' , $ query ) , $ params ) -> execute ( ) ; if ( true === $ statement ) { $ amount = $ this -> getAdapter ( ) -> toArray ( ) ; if ( true === isset ( $ amount [ 0 ] [ 'amount' ] ) ) { return $ amount [ 0 ] [ 'amount' ] ; } } return false ; }
Retrieve the number of rows
@param string $column
@param string $where
@param array $params
@return int|boolean
Retrieve the number of rows