2017 © Pedro Peláez
 

library periscope-to-mysql

Take your Periscope SQL and generate MySQL statements.

image

fulfillment/periscope-to-mysql

Take your Periscope SQL and generate MySQL statements.

  • Saturday, March 12, 2016
  • by FoxxMD
  • Repository
  • 3 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

periscopeToMySQL

periscopedata.com is a powerful and useful tool for generating reports, but sometimes I want to put what I write in Periscope to use elsewhere. This package allows you to write once but generate MySQL statements with filters and daterange within PHP., (*1)

Limits

You bet..., (*2)

  • UTC is assumed to be used by your DB
  • Always converts to EST
  • Unaware of foreign keys = unable to automatically join tables

Example

use Fulfillment\periscopeToMySQL\periscopeToMySQL;

$args = [
    'dateStart' => "2016-01-01",
    'dateEnd'   => "2016-03-11",
    'Warehouse' => "1,2,3",
    'State'     => "GA",
];

$sql = 'SELECT
            [yourFirstTable.aDate:est] AS aDate,
            yourSecondTable.part2
        FROM
            yourFirstTable
            JOIN yourSecondTable ON yourFirstTable.id = yourSecondTable.id
        WHERE
            [yourFirstTable.recordedOn=daterange:est]
            AND [yourFirstTable.warehouse=Warehouse]
            AND [yourSecondTable.state=State]';

$sql = periscopeToMySQL::fillTemplate($sql, $args);

Installation

WARNING: this project is still in development, (*3)

Composer

composer require fulfillment/periscope-to-mysql
"require": {
    "fulfillment/periscope-to-mysql": "dev-master"
}

Local

"repositories": [
    {
        "type": "path",
        "url": "../periscope-to-mysql"
    }
],
"require": {
    "fulfillment/periscope-to-mysql": "dev-master"
}

Contribute

Feel free, time zone support may be a good place to start., (*4)

The Versions

12/03 2016

dev-master

9999999-dev

Take your Periscope SQL and generate MySQL statements.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Mike Garde

12/03 2016

0.0.2

0.0.2.0

Take your Periscope SQL and generate MySQL statements.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Mike Garde

11/03 2016

0.0.1

0.0.1.0

Take your Periscope SQL and generate MySQL statements.

  Sources   Download

The Requires

  • php >=5.3.0

 

by Mike Garde