Notified when you get tipped

Started by Anomaly, December 22, 2017, 09:09:27 PM

nicefish

To search an user's posts for tipped posts, couldn't you just do some joins?

SELECT DISTINCT posts.post_id
FROM posts
INNER JOIN tips ON tips.post_id = posts.post_id
WHERE posts.user_id = YOU
ORDER BY posts.post_id DESC
LIMIT 10

(I haven't written SQL in like 5 years)

Yam

Quote from: nicefish on December 01, 2019, 10:27:32 PM
To search an user's posts for tipped posts, couldn't you just do some joins?

SELECT DISTINCT posts.post_id
FROM posts
INNER JOIN tips ON tips.post_id = posts.post_id
WHERE posts.user_id = YOU
ORDER BY posts.post_id DESC
LIMIT 10

(I haven't written SQL in like 5 years)
Ye u right, but I'm bad at SQL and didn't think of it at the time lol

If Rachel wants I could probably fix it.
characters

here cums the fuck truck

and thank you for making the tip page :)
m'lady

rachel

Quote from: Yam on December 02, 2019, 09:54:42 AM
Quote from: nicefish on December 01, 2019, 10:27:32 PM
To search an user's posts for tipped posts, couldn't you just do some joins?

SELECT DISTINCT posts.post_id
FROM posts
INNER JOIN tips ON tips.post_id = posts.post_id
WHERE posts.user_id = YOU
ORDER BY posts.post_id DESC
LIMIT 10

(I haven't written SQL in like 5 years)
Ye u right, but I'm bad at SQL and didn't think of it at the time lol

If Rachel wants I could probably fix it.

Yes please, you know I love it when you write code
*spork*