There is a description table:
id title text text_ru And the description_title table:
id text text_ru It is necessary to combine the data of these tables in the field title -> id, now I wrote such a query:
SELECT d.*, dt.* FROM description d LEFT JOIN description_title dt ON (d.title = dt.id) WHERE d.id = 1 Now it turns out that the fields with the same name in the tables interrupt each other, is it possible to return them in such a way that this does not happen, for example, add some prefix to the first table and the second as a result?
PS The option of listing the fields of each table and specifying prefixes will not work, because new fields will be added to these tables, for example text_ua , multilanguage. Those. all fields in the first table and all fields in the second table must be returned.
PSS Now the result is: id - title - text - text_ru - id - text - text_ru . And you need to get something like this: table1_id - table1_title - table1_text - table1_text_ru - table2_id - table2_text - table2_text_ru .
*in a SELECT query is Anton Shchyrov