0
I consulted on the subject and even managed to find some ways but nothing that could solve my case, I will try to be direct to facilitate. I have a table where I list some visits of some companies, I have the visits of types RTV and ATV and I am adding the visits and putting in this table in the respective fields on the dates, each sum represents the visits made, in the example below the day 18/09 had 3 visits ATV.
Every visit this one has one ID
, that is to say, 3 IDs
and what I’m trying to do is unite these ID´s
in the same variable, I made the necessary selects and created this structure to store them, but not dynamically, I am making this select within a loop
and he’s like, in the case of the ATV visit:
$sqlMontaLinkATV = "SELECT supVisitaRtv.IdVisita FROM supVisitaRtv WHERE Tipo = 'ATV' AND supVisitaRtv.Data = ? AND IdEmpresa = ? ";
$arrayParamLinkATV = array($DataInc, $IdEmpresa);
$ResultadoLinkATV = $crud->getSQLGeneric($sqlMontaLinkATV, $arrayParamLinkATV, TRUE);
The result of this research I’m seeing like this with a print_r($ResultadoLinkATV)
:
Array ( [0] => stdClass Object ( [IdVisita] => 33 ) [1] => stdClass Object ( [IdVisita] => 34 ) [2] => stdClass Object ( [IdVisita] => 37 ) )
Where I have the visitor ID’s I need, I tried to insert them into a variable like this:
$IdVisita = array();
array_push($IdVisita, $ResultadoLinkATV[0]->IdVisita);
I hope I have been able to explain satisfactorily.
In your bank '3' is a real value or you arrive at '3' adding up records of visits at time of consultation?
– AnthraxisBR