Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

How will this query be rewritten using JOIN?

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

Post a Comment

0 Comments