SELECT DISTINCT Type FROM Products
WHERE Type != "System"
  AND Type != "Upgrade";

Or

SELECT DISTINCT Type FROM Products
WHERE Type NOT IN ("System", "Upgrade");

                -----Original Message-----
                From:   Webmaster Odell [mailto:[EMAIL PROTECTED]]
                Sent:   Thursday, August 30, 2001 3:36 PM
                To:     MySQL
                Subject:        Select without taking all items

                Hi

                I am trying to write a query that pulls all the items from a database 
except
                two

                here is what I am using:

                $query = 'SELECT DISTINCT Type FROM Products WHERE Type != "System,
                Upgrade"';

                This populates the drop down box with all including the System and 
Upgrade.
                What do I have to do to make this work?

                Thanks

                Kevin

                Internet Designer
                O'Dell Web Design
                http://www.odellwebdesign.com



                ---------------------------------------------------------------------
                Before posting, please check:
                   http://www.mysql.com/manual.php   (the manual)
                   http://lists.mysql.com/           (the list archive)

                To request this thread, e-mail <[EMAIL PROTECTED]>
                To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
                Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to