What is this query doing ?? - 06/10/2004 6:01 PM
[:"red"]
SELECT t1.B_Number,t1.B_Main,t3.U_Username,t1.B_Subject,t1.B_Posted,t1.B_Board,
t3.U_Color,t1.B_Reged,t1.B_Icon,t2.Bo_Title,t2.Bo_Read_Perm,t2.Bo_Cat,
t1.B_Posterid,t1.B_Status,t1.B_AnonName,t1.B_Body
FROM
w3t_Posts AS t1, w3t_Boards AS t2, w3t_Users AS t3
WHERE
t1.B_Approved = 'yes' AND t1.B_Board = t2.Bo_Keyword
AND t1.B_Posterid = t3.U_Number AND t1.B_Status <> 'M'
AND t1.B_Board IN ('board1','board2','other boards...')
ORDER BY B_Posted DESC LIMIT 26
[/]
Hi , I wonder what is this query string doing ? and how to 'trigger' this query in UBBThreads ?
It seems this query is from dosearch.php ...
But , to prevent serious search loading , I've removed all search link and forms in my threads. Even registered users can not search.
But I often observed this query running and cause my site hang ...
How does ubbthreads trigger this query ? What templates or code should I change ?
If I am not wrong , dosearch should do SQL LIKE search , and "show user's all post query" . The former can be removed by editing search.tmpl and postlist.tmpl . And the later query is 'light' to MySQL.
But I just cannot figure how to trigger this strange query ... And ... how to prevent it ?
SELECT t1.B_Number,t1.B_Main,t3.U_Username,t1.B_Subject,t1.B_Posted,t1.B_Board,
t3.U_Color,t1.B_Reged,t1.B_Icon,t2.Bo_Title,t2.Bo_Read_Perm,t2.Bo_Cat,
t1.B_Posterid,t1.B_Status,t1.B_AnonName,t1.B_Body
FROM
w3t_Posts AS t1, w3t_Boards AS t2, w3t_Users AS t3
WHERE
t1.B_Approved = 'yes' AND t1.B_Board = t2.Bo_Keyword
AND t1.B_Posterid = t3.U_Number AND t1.B_Status <> 'M'
AND t1.B_Board IN ('board1','board2','other boards...')
ORDER BY B_Posted DESC LIMIT 26
[/]
Hi , I wonder what is this query string doing ? and how to 'trigger' this query in UBBThreads ?
It seems this query is from dosearch.php ...
But , to prevent serious search loading , I've removed all search link and forms in my threads. Even registered users can not search.
But I often observed this query running and cause my site hang ...
How does ubbthreads trigger this query ? What templates or code should I change ?
If I am not wrong , dosearch should do SQL LIKE search , and "show user's all post query" . The former can be removed by editing search.tmpl and postlist.tmpl . And the later query is 'light' to MySQL.
But I just cannot figure how to trigger this strange query ... And ... how to prevent it ?