src/DB/TableReader.php
public function getData( $first = FALSE, $orders = array(), $limit = array(), $verbose = FALSE )
	{
		$data = array();
		if( $this->isFocused() && sizeof( $this->fields ) )
		{
			$conditions	= $this->getConditionQuery( array() );
			$orders		= $this->getOrderQuery( $orders );
			$limit		= $this->getLimitQuery( $limit );

		 	$query = 'SELECT * FROM '.$this->getTableName().' WHERE '.$conditions.$orders.$limit;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			if( $q->RecordCount() )
			{
				while( $d = $q->FetchNextObject( FALSE ) )
				{
					$line = array();
					foreach( $this->fields as $field )
						$line[$field] = $d->$field;
					$data[] = $line;
				}
			}
		}
		if( count( $data ) && $first )
			$data	= $data[0];
		return $data;
	}
public function getData( $first = FALSE, $orders = array(), $limit = array(), $verbose = FALSE )
	{
		$data = array();
		if( $this->isFocused() && sizeof( $this->fields ) )
		{
			$conditions	= $this->getConditionQuery( array() );
			$orders		= $this->getOrderQuery( $orders );
			$limit		= $this->getLimitQuery( $limit );

		 	$query = 'SELECT * FROM '.$this->getTableName().' WHERE '.$conditions.$orders.$limit;
			if( $verbose )
				echo '<br/>'.$query;
			$q	= $this->dbc->Execute( $query );
			if( $q->RecordCount() )
			{
				while( $d = $q->FetchNextObject( FALSE ) )
				{
					$line = array();
					foreach( $this->fields as $field )
						$line[$field] = $d->$field;
					$data[] = $line;
				}
			}
		}
		if( count( $data ) && $first )
			$data	= $data[0];
		return $data;
	}
public function getData ( $ first = FALSE , $ orders = array ( ) , $ limit = array ( ) , $ verbose = FALSE ) { $ data = array ( ) ; if ( $ this -> isFocused ( ) && sizeof ( $ this -> fields ) ) { $ conditions = $ this -> getConditionQuery ( array ( ) ) ; $ orders = $ this -> getOrderQuery ( $ orders ) ; $ limit = $ this -> getLimitQuery ( $ limit ) ; $ query = 'SELECT * FROM ' . $ this -> getTableName ( ) . ' WHERE ' . $ conditions . $ orders . $ limit ; if ( $ verbose ) echo '<br/>' . $ query ; $ q = $ this -> dbc -> Execute ( $ query ) ; if ( $ q -> RecordCount ( ) ) { while ( $ d = $ q -> FetchNextObject ( FALSE ) ) { $ line = array ( ) ; foreach ( $ this -> fields as $ field ) $ line [ $ field ] = $ d -> $ field ; $ data [ ] = $ line ; } } } if ( count ( $ data ) && $ first ) $ data = $ data [ 0 ] ; return $ data ; }
Returns data of focused primary key.
@access		public
@param		array	$data		array of data to store
@return		bool
Returns data of focused primary key .