PHP code example of vasilisq / mdx-query-builder
1. Go to this page and download the library: Download vasilisq/mdx-query-builder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vasilisq / mdx-query-builder example snippets
$query = new Query($connection);
$dateRange = new DateRange(
Carbon::parse('2019-01-01'),
Carbon::parse('2019-01-31'),
Period::DAY
);
$mdx = $query->select([
'[Measures].[Retail Total]',
'[Measures].[Profit]',
])
->by($dateRange)
->from('Sales')
->toMDX();