I have several tables in which a shared variable is stored. How to get all variables from each table with one query? And how to return all variables as in the example? Is it even possible?
$id1 = BDR::selectBySQL("g","SELECT * FROM i1 WHERE ix='".$this->ixx."' LIMIT 1");
foreach($id1 as $id1)
{
$id1 = $id1['idz'];
}
$id2 = BDR::selectBySQL("g","SELECT * FROM i2 WHERE ix='".$this->ixx."' LIMIT 1");
foreach($id2 as $id2)
{
$id2 = $id2['idxc'];
}
$id3 = BDR::selectBySQL("g","SELECT * FROM i3 WHERE ix='".$this->ixx."' LIMIT 1");
foreach($id3 as $id3)
{
$id3 = $id3['idsd'];
}
return ['id2'=>$id1,'id2'=>$id2,'id3'=>$id3];