src/DB/TableReader.php
public function getAllData( $keys = array(), $conditions = array(), $orders = array(), $limits = array(), $verbose = FALSE )
	{
		if( sizeof( $this->fields ) )
		{
			if( ( is_array( $keys ) && !count( $keys ) ) || ( is_string( $keys ) && !$keys ) )
				$keys	= array( '*' );
			$conditions	= $this->getConditionQuery( $conditions, FALSE, FALSE );
			$conditions = $conditions ? ' WHERE '.$conditions : '';
			$orders		= $this->getOrderQuery( $orders );
			$limits		= $this->getLimitQuery( $limits );

			$list	= array();
			$query = 'SELECT '.implode( ', ', $keys ).' FROM '.$this->getTableName().$conditions.$orders.$limits;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			while( $d = $q->FetchNextObject( FALSE ) )
			{
				$data	= array();
				foreach( $this->fields as $field )
					if( in_array( '*', $keys ) || in_array( $field, $keys ) )
						$data[$field] = $d->$field;
				$list[] = $data;
			}
		}
		return $list;
	}
public function getAllData( $keys = array(), $conditions = array(), $orders = array(), $limits = array(), $verbose = FALSE )
	{
		if( sizeof( $this->fields ) )
		{
			if( ( is_array( $keys ) && !count( $keys ) ) || ( is_string( $keys ) && !$keys ) )
				$keys	= array( '*' );
			$conditions	= $this->getConditionQuery( $conditions, FALSE, FALSE );
			$conditions = $conditions ? ' WHERE '.$conditions : '';
			$orders		= $this->getOrderQuery( $orders );
			$limits		= $this->getLimitQuery( $limits );

			$list	= array();
			$query = 'SELECT '.implode( ', ', $keys ).' FROM '.$this->getTableName().$conditions.$orders.$limits;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			while( $d = $q->FetchNextObject( FALSE ) )
			{
				$data	= array();
				foreach( $this->fields as $field )
					if( in_array( '*', $keys ) || in_array( $field, $keys ) )
						$data[$field] = $d->$field;
				$list[] = $data;
			}
		}
		return $list;
	}
public function getAllData ( $ keys = array ( ) , $ conditions = array ( ) , $ orders = array ( ) , $ limits = array ( ) , $ verbose = FALSE ) { if ( sizeof ( $ this -> fields ) ) { if ( ( is_array ( $ keys ) && ! count ( $ keys ) ) || ( is_string ( $ keys ) && ! $ keys ) ) $ keys = array ( '*' ) ; $ conditions = $ this -> getConditionQuery ( $ conditions , FALSE , FALSE ) ; $ conditions = $ conditions ? ' WHERE ' . $ conditions : '' ; $ orders = $ this -> getOrderQuery ( $ orders ) ; $ limits = $ this -> getLimitQuery ( $ limits ) ; $ list = array ( ) ; $ query = 'SELECT ' . implode ( ', ' , $ keys ) . ' FROM ' . $ this -> getTableName ( ) . $ conditions . $ orders . $ limits ; if ( $ verbose ) echo '<br/>' . $ query ; $ q = $ this -> dbc -> Execute ( $ query ) ; while ( $ d = $ q -> FetchNextObject ( FALSE ) ) { $ data = array ( ) ; foreach ( $ this -> fields as $ field ) if ( in_array ( '*' , $ keys ) || in_array ( $ field , $ keys ) ) $ data [ $ field ] = $ d -> $ field ; $ list [ ] = $ data ; } } return $ list ; }
Returns all entries of this Table in an array.
@access		public
@param		array		$keys			Array of Table Keys
@param		array		$conditions		Array of Condition Strings (field*)
@param		array		$orders			Array of Order Relations (field => ASC|DESC)*
@param		array		$limits			Array of Limit Conditions (offset, max)?
@param		bool		$verbose		Flag: print Query
@return		array
Returns all entries of this Table in an array .