public function query ($sql, array $bound_parameters = array(), $fetch = true) {

		$statement = $this -> entity_manager -> getConnection() -> prepare($sql);

		foreach ($bound_parameters as $parameter => $value) {
			$statement -> bindValue($parameter, $value);
		}

		$statement -> execute();

		if ($fetch) {
			return $statement -> fetchAll();
		} else {
			return null;
		}
	}
public function query ($sql, array $bound_parameters = array(), $fetch = true) {

		$statement = $this -> entity_manager -> getConnection() -> prepare($sql);

		foreach ($bound_parameters as $parameter => $value) {
			$statement -> bindValue($parameter, $value);
		}

		$statement -> execute();

		if ($fetch) {
			return $statement -> fetchAll();
		} else {
			return null;
		}
	}
public function query ( $ sql , array $ bound_parameters = array ( ) , $ fetch = true ) { $ statement = $ this -> entity_manager -> getConnection ( ) -> prepare ( $ sql ) ; foreach ( $ bound_parameters as $ parameter => $ value ) { $ statement -> bindValue ( $ parameter , $ value ) ; } $ statement -> execute ( ) ; if ( $ fetch ) { return $ statement -> fetchAll ( ) ; } else { return null ; } }
Performs an arbitrary SQL query.

@author Cam Morrow

@param string		$sql
@param array			[$bound_parameters]
@param bool			[$fetch]

@return array|null
Performs an arbitrary SQL query .