I use libmariadb to communicate with mysql server.
Is there a way to figure out from MYSQL_RES (or else), what tables takes a part in the query result?
For example, for query
SELECT name, number FROM person INNER JOIN phone ON ...
I want discover which fields come from the table 'person' and which from 'phone'.
PS:
To retrieve information about tables for particular fields in the result need to use function:
mysql_fetch_field()
And get string org_table from MYSQL_FIELD.