I think you simplified it a bit. The query you quote will return exactly what you want. Here's an example (choosing from the same table twice gives a similar situation like yours)
mysql> select * from test t1 join test t2 on t1.a = t2.a LIMIT 1,5; +------+------+------+------+ | a | b | a | b | +------+------+------+------+ | 1 | 2 | 1 | 1 | | 1 | 1 | 1 | 2 | | 1 | 2 | 1 | 2 | | 2 | 2 | 2 | 2 | | 2 | 2 | 2 | 2 | +------+------+------+------+ 5 rows in set (0.00 sec)
Mysql has no problem labeling columns in a result set with the same labels. I assume that your original request had a choice of t1. * In the highlighted part.
If you want to refer to individual fields whose names are ambiguous, you will get
mysql> select a from test t1 join test t2 on t1.a = t2.a LIMIT 1,5; ERROR 1052 (23000): Column 'a' in field list is ambiguous
And you must specify exactly what you want (column aliases are optional, you can also do t1., T2)
mysql> select t1.a first, t2.a second from test t1 join test t2 on t1.a = t2.a LIMIT 1,5; +-------+--------+ | first | second | +-------+--------+ | 1 | 1 | | 1 | 1 | | 1 | 1 | | 2 | 2 | | 2 | 2 | +-------+--------+ 5 rows in set (0.00 sec)
Edit 22MAR After changing the sampled data, it seems that you want to turn several rows from one table into one. Here is a specific solution (provided that you will always have tax lines, totals and totals lines, and that you are only interested in these lines).
SELECT t1.id, t1.name, t2.product_id, t2.price, t3a.number subtotal, t3b.number total, t3c.number tax FROM `table_one` AS t1 INNER JOIN `table_two` AS t2 ON t1.id = t2.id INNER JOIN `table_three` AS t3a ON t1.id = t3a.id and t3a.text = "Subtotal" INNER JOIN `table_three` AS t3b on t3a.id = t3b.id and t3b.text = "Total" INNER JOIN `table_three` AS t3c on t3b.id = t3c.id and t3c.text = "Tax"
(if you want, you can also select the constants "Tax", "Total" and "Total" in the selected part and specify column names for them)
One thing that remains unclear is the relationship between id in tables - this is the primary key of table_one or table_two. This can affect the results, of course, when you have multiple rows in table_one and table_two.