I've been looking for this but I didn't found what I need. I'm creating an admin page and I need to access the db values from a php interface.
I need to get all the rows from many tables. First I tried with:
SELECT * FROM t1, t2, t3, t4
But that's duplicating rows many times, something odd... The first table have 8 rows, the second 8 too, the third 7 and the fourth 1. There are 24 rows in total, but if I execute that query I get 448 rows... why?
Let's say that I have 4 tables and I want to get all that data in one query, get the columns in the order I put the tables in the query but without duplicate... There are no conditions, just get all the data like if I make 4 queries:
SELECT * FROM t1
SELECT * FROM t2
SELECT * FROM t3
SELECT * FROM t4
If I do this no data is duplicated... why?
How would I merge those 4 queries but still getting the same results? (no duplicated data)