Good day. Faced with such questions.
I create a simple query with a choice of data from mysql
SELECT name, name2 FROM table As a result, I deduce
$row['name'] $row['name2'] After that, a more complex query with many-to-many connections is created and you have to use this option.
SELECT t1.*, t2.* FROM table1 AS t1 INNER JOIN table2 AS t2 ON t1.id = t2.id ... And now the question! If you register in this way the output:
$row['t1.name'] $row['t2.name2'] Nothing will happen. And this is understandable.
Is it possible to somehow refer to a table and then to a cell for output? Or the simplest and perhaps the only solution is also to assign a "reduction" for the cells.
SELECT t1.name as name, t2.name2 as name2 FROM table1 AS t1 INNER JOIN table2 AS t2 ON t1.id = t2.id ... $row['name'] $row['name2']