Hi guys,
I am using TEMPORARY TABLE called Grupa with MEMORY engine to store temp data from another query. To access data stored in TEMP TABLE I am running this in Setup() function:
->requestDataSending();
I have query like below:
$this->src('automaker')
->query("SELECT SUM(Kolicina) UkupnaKolicina FROM cm_prodaja INNER JOIN
Grupa ON cm_prodaja.Grupa = Grupa.Grupa WHERE
DatumOtprem BETWEEN '2019-01-02' and '2019-01-11' AND cm_prodaja.Grupa like 'D%'
")
->pipe($this->dataStore("q_kolicina"))
->requestDataSending();
I would like to access UkupnaKolicina as final int value using line below:
$q_kolicina = $this->dataStore("q_kolicina")->data()[0]["UkupnaKolicina"];
The problem is that I am getting error saying that table Grupa does not exist. And that happens only when I am using ->requestDataSending(); to capture data. No matter where I place it, it just breaks things. I do not know what is going on, but requestDataSending works on all normal DB tables just fine where there is no TEMPORARY table used.
Can someone tell me how to access the value from this query?
Thx