Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1712

Extension Writers Discussion • Re: SQL Query optimization

$
0
0
Not an SQL guru here, but I'd try something like

Code:

$sql = 'SELECT COUNT(p.post_id) AS topics_solvedFROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' tWHERE p.poster_id = ' . (int) $user_id . 'AND p.post_id = t.topic_solvedAND t.topic_solved <> 0';$sql = 'SELECT COUNT(DISTINCT topic_solved) AS total_solvedFROM ' . TOPICS_TABLE . 'WHERE topic_solved <> 0';

Statistics: Posted by rxu — Wed Jun 19, 2024 4:32 am



Viewing all articles
Browse latest Browse all 1712

Trending Articles