PDA

View Full Version : I need a mysql script to....


tsptom
08-02-2009, 05:17 PM
I created a php script to show a link to the latest post on my home page (non vbulletin).

I want to exclude on particular forum (forumid # 7 in example below) from that list. Here's what I have, but is not working.
SELECT *
FROM vb_post, vb_thread
where vb_post.threadid = vb_thread.threadid and
vb_thread.forumid != 7 and
postid in (select max(postid)
FROM vb_post, vb_thread
where vb_post.threadid = vb_thread.threadid and
vb_thread.forumid != 7)"
Can anyone offer some assistance? This script just hangs.

Thanks!

1Unreal
08-02-2009, 08:11 PM
Use the NOT IN clause

tsptom
08-02-2009, 08:35 PM
Thanks! I figured it out a different way. Probably inefficiently, but it works.