• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Stupid stupid query!!

Marc

Well-known member
#1
Please could someone help me out here. Got a query which when run in phpmyadmin kills the server.... Need to get the info, but not sure how to optimise it more. For someone who programs with sql server every day of his life, I feel pretty stupid at the moment LOL.

SELECT
post.user_id,
post.post_id,
thread.thread_id,
thread.title AS thread_title,
thread.node_id,
node.title AS forum_title,
user.username
FROM xf_thread as thread
LEFT JOIN xf_post AS post ON post.last_post_id = post.post_id
LEFT JOIN xf_node AS node ON(node.node_id = thread.node_id)
LEFT JOIN xf_user AS user ON(user.user_id = post.user_id)
WHERE NOT ISNULL(thread.thread_id)
AND thread.discussion_state = 'visible'
ORDER BY thread.last_post_date DESC
LIMIT 10
 

Marc

Well-known member
#4
Shaun your a star ....... query took 0.0006 sec LOL .... bit better than a never ending loop on insane rubbish lol

If I could 'Like' twice .... I would LOL