Hi all,
I am looking for way to call certain query defined in global variable. I want to create list with all used queries and store it in one php fine and than just include file where needed and use as below:
// stored in libraries/my_queries.php
$my_query_list["first_query"] = "SELECT (*) FROM articles";
$my_query_list["second_query"] = "SELECT (*) FROM comments";
// ...
// ...
$my_query_list["other_query"] = "SELECT (*) FROM top_articles";
And than call it as:
include "libraries/my_queries.php"; // include on the top of the MyReport.php file
// setup() section
$this->src('automaker')
->query($my_query_list["second_query"])
->pipe($this->dataStore("my_results"));
Problem is that it does not "see" globally available variables. What should I do to make this work?