Retaining value for all pages of a thread?

Retaining value for all pages of a thread?
0
14
Let's assume I want to push the count of a user's posts in a thread into the thread's template. Then, I would need to query something like

"SELECT COUNT FROM post WHERE thread_id = AND user_id = ".

But what about pages 2, 3, 4, ...?

Do I want an extra query for each page? Does it make sense to cache this value? If so, where and how? If not, why not?

Читать далее...
 
Активность
Пока что здесь никого нет
Назад
Верх Низ
Яндекс.Метрика