Notified when you get tipped

  • 18 Replies
  • 9518 Views
Re: Notified when you get tipped
« Reply #15 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)

Yam's Avatar

Yam

Re: Notified when you get tipped
« Reply #16 on: December 02, 2019, 09:54:42 am »
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

thank you for explaining, Yam
« Reply #17 on: December 02, 2019, 06:12:23 pm »
and thank you for making the tip page :)

YAM TIPPED 420 CORAL FOR THIS POST

m'lady

Re: Notified when you get tipped
« Reply #18 on: December 03, 2019, 03:05:19 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

HERE CUMS THE FUCK TRUCK TIPPED 69 CORAL FOR THIS POST

*spork*