MyBB Support

COUNT (SQL) problem

Submitted by DarSider, , Thread ID: 5026

Thread Closed

RE: COUNT (SQL) problem

#6
Then:

Code:
SELECT COUNT(p.pid) AS postnum, t.tid FROM mybb_posts p
LEFT JOIN mybb_threads t ON( t.tid = p.tid )
WHERE t.uid = '1'
GROUP BY t.tid

This should give you posts that you have made on each thread that you have made.
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.


Users browsing this thread: 2 Guest(s)