illegal query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • joost

    illegal query

    Hello,

    I'm kind of new to mySQL but more used to Sybase/PHP
    What is illegal about this query or can i not use combined query's in mySQL?

    DELETE FROM manufacturers
    WHERE manufacturers_i d NOT IN ( SELECT manufacturers_i d
    FROM
    products )

    Kind Regards
    Joost Wolthuis



  • David E. Smith

    #2
    Re: illegal query

    In comp.lang.php joost wrote:
    [color=blue]
    > I'm kind of new to mySQL but more used to Sybase/PHP
    > What is illegal about this query or can i not use combined query's in mySQL?
    >
    > DELETE FROM manufacturers
    > WHERE manufacturers_i d NOT IN ( SELECT manufacturers_i d
    > FROM
    > products )[/color]

    Many versions of MySQL don't support subselects. I think some of the
    newest bleeding-edge versions do, but 3.x (which is probably what you're
    running, as 4.0 is still fairly young) doesn't, period, IIRC.

    ....dave

    Comment

    Working...