List:General Discussion« Previous MessageNext Message »
From:leeladharan acharya Date:June 4 2007 6:03pm
Subject:Issue with SubSelect Quey
View as plain text  

In MySQL, The following Query

SELECT `post`.`userid` , `post`.`pagetext` , `post`.`dateline`
,`post`.`threadid` , `thread`.`title` , `thread`.`forumid` FROM `post`LEFT
JOIN `thread` ON `post`.`threadid`=`thread`.`threadid` WHERE`userid`=`xyz`
AND `thread`.forumid not in(SELECT `childlist` from`forum` where
forumid=`xyz`) AND `post`.`visible`=1 AND`thread`.visible = 1  ORDER BY
`post`.`dateline` DESC LIMIT 5;

The above Query's subselect query doesn't work properly, it lists even the
posts whose forum id is in subselect query.

If the same Query with inner Query replaced by direct values gives the
expected result set...

Is this problem with My Query or Something else.. ?


Issue with SubSelect Queyleeladharan acharya4 Jun
  • Re: Issue with SubSelect QueyPeter Brawley4 Jun