How will this query be rewritten using JOIN?
There are 4 tables at least, like these:
1. PostsTable
pid, stat, title, etc etc
2. tagsTable
id, pid, tag
3. profilesTable
profileID, username, etc etc
4. ratingsTable
id, pid, profileID, etc etc
Currently am using:
select something something
from postsTable as p, profilesTable as pr, ratingsTable as r, tagsTable as t
where
p.stat='y' and
t.pid = p.pid and
r.pid = p.pid and
pr.profileID = r.profileID
"something something" are columns...
How will this query be rewritten using JOIN?
from MySQL https://ift.tt/2GWZlOV
via IFTTT
0 Comments