Background
Hello, I\'m developing an experimental/educational tool in PHP and MySQL. I\'m new to SQL, but I want to do things the right way from th
Assuming that user input is limited to only selecting the tables and fields (i.e. no additional conditions), you should be fine with your approach; sounds interesting :)
One thing I would like to add is that certain joins are better than others. For example, joining two tables using their primary keys (or other indexes) will perform way better than two unrelated columns for which a full table scan is required.
This all depends on how big the tables are in the first place; for less than a few thousand records, you should be okay; anything beyond serious contemplation is in place :)