protected function queryWithIndex($sql,$index,$findex=NULL,$bindparams=NULL) {
		if ($result = $this->executeQuery($sql,$bindparams)) {
			$temp = array();
			if ($findex) {
				foreach ($result as $row) {
					$temp[$row[$findex]][$row[$index]] = $row;
				}
			} else {
				foreach ($result as $row) {
					$temp[$row[$index]] = $row;
				}
			}
			return $temp;
		}
		return false;
	}
protected function queryWithIndex($sql,$index,$findex=NULL,$bindparams=NULL) {
		if ($result = $this->executeQuery($sql,$bindparams)) {
			$temp = array();
			if ($findex) {
				foreach ($result as $row) {
					$temp[$row[$findex]][$row[$index]] = $row;
				}
			} else {
				foreach ($result as $row) {
					$temp[$row[$index]] = $row;
				}
			}
			return $temp;
		}
		return false;
	}
protected function queryWithIndex ( $ sql , $ index , $ findex = NULL , $ bindparams = NULL ) { if ( $ result = $ this -> executeQuery ( $ sql , $ bindparams ) ) { $ temp = array ( ) ; if ( $ findex ) { foreach ( $ result as $ row ) { $ temp [ $ row [ $ findex ] ] [ $ row [ $ index ] ] = $ row ; } } else { foreach ( $ result as $ row ) { $ temp [ $ row [ $ index ] ] = $ row ; } } return $ temp ; } return false ; }
Query the DB and return the rows as a 1 or 2 dimensional indexed array
@param string $sql The query string
@param string $index The table's primary key
@param string $findex An optional foreign key from the table (when used, returns a 2 dimensional array, indexed first by $index, second by $findex)
@param mixed[] $bindparams An array of values to be binded by PDO to any query parameters
@return array[]|false $results A two dimensional array representing the resulting rows: array(array("id"=>1,"field"=>"value1"),array("id"=>2","field"=>"value2")), false on failure
Query the DB and return the rows as a 1 or 2 dimensional indexed array