- تاریخ ثبتنام
- 2020-06-26
- نوشتهها
- 21,408
- راهحلها
- 27
- پسندها
- 3,264
- امتیازها
- 113
- سن
- 27
- محل سکونت
- England
- وب سایت
- xenforo.xyz
I'd like to select posts that are threads and posts that are just posts into one query.
For the threads I have:
Code:
And for the posts I have:
Code:
How can I merge these together?
Thanks in advance!
For the threads I have:
Code:
SELECT * FROM xf_thread A INNER JOIN xf_post B ON A.post_date = B.post_date WHERE prefix_id IN (1,3,5,6,7) ORDER BY A.thread_id DESC LIMIT 10
And for the posts I have:
Code:
SELECT * FROM xf_post A WHERE thread_id = 12841 AND user_id = 1 ORDER BY post_id DESC LIMIT 10
How can I merge these together?
Thanks in advance!
نام موضوع : SQL to select posts and threads into one query?