If I am fetching results from a JOIN
query, how do I get separate variables for each table in the join per each row?
For example:
$result = $mysql->query(sprintf('SELECT *
FROM `TableOne` one
JOIN `TableTwo` two ON (one.TwoID = two.TwoID)
JOIN `TableThree` three ON (one.ThreeID = three.ThreeID)
WHERE one.OneID = %u',
(int)$primary_key));
while ($row = $result->fetch_assoc()) {
// Instead of $row, I want:
// $one: all fields from TableOne
// $other: all fields from TableTwo and TableThree
}