Hi Daniel,

> Jigal, thank you very much. However, this does not resolve my issue.
>
> even when querying:
> SELECT * FROM ae_articles AS art LEFT JOIN ae_articlesections AS sec ON
> art.ID=sec.articleID WHERE art.title LIKE '%bush%' AND sec.sectionID IN
(1,2)
> AND sec.sectionID NOT IN (3)

What *is* your issue? The query above is not the one I suggested...

I guess you have articles which are in more than one section (which you
haven't told us)...

> it displays all articles, even those which are in section no. 3...

If you want to display the data on ae_articles which are not in section no.
3 (assuming there are only three sections):

SELECT * FROM ae_articles AS art LEFT JOIN ae_articlesections AS sec ON
art.ID=sec.articleID AND sec.sectionID=3 WHERE art.title LIKE '%bush%' AND
sec2.sectionID IS NULL

You can end up with duplicate articles, since an article might be in both
section 1 and 2, but you can filter these out by adding "GROUP BY art.ID"

> However, thanks for the tip on syntax. I think MySQL official documentors
make
> it sometimes overcomplicated. I think this is common problem with MySQL
> documentation - very long, very technical/boring, but with very few
examples or
> suggestions or event pointers as to what to try.

I don't share this opinion. If you have basic knowledge about SQL the MySQL
documentation makes perfect sense. It is technical, but it should be. It has
examples which illustrate for example the way a function works.

There are loads of tutorials on the web, there are many books about MySQL at
about every level, this list helps in most cases, bugs are often fixed in a
matter of days and you can always buy technical support if you need it.

If you think certain parts of the documentation should be changed, you can
always offer to help or file a bug-report with an improved piece of
documentation. Paul du Bois c.s. will be more than happy to incorporate
extra documentation, I guess ;-)

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to