MyBB Support

COUNT (SQL) problem

Submitted by DarSider, , Thread ID: 5026

Thread Closed

RE: COUNT (SQL) problem

Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
375
Credits:
11K
25-06-2015, 04:56 AM
#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: 1 Guest(s)