I am not sure on the proper way or the different ways of joining tables (in MySQL).
What is the difference in functionality between the following statements? The first one uses the JOIN statement in the FROM clause, while the second example uses WHERE "unique ID from T1" = "unique ID from T2" to join the tables:
SELECT t1.id, t1.ref, t1.type, t2.address, t2.city
FROM t1 JOIN t2
WHERE t1.ref= '$something'
AND t1.office = t2.ref
SELECT t1.id, t1.ref, t1.type, t2.address, t2.city
FROM t1, t2
WHERE t1.ref='$something'
AND t1.office=t2.ref
AND t1.UNIQUEid=t2.UNIQUEid
Are these both proper ways to JOIN tables?
Also, I have heard of LEFTJOINs and all other types of JOINs. Are the other JOINs important, or can they be worked-around?