Jump to content


Photo

Select from table where type = NOT 'something'


  • Please log in to reply
2 replies to this topic

#1 stualk

stualk
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 27 September 2006 - 05:16 PM

Hi Chaps,

Does anyone know how to do a select from query where something is NOT 'something'?

What i'm trying to do is to display products from a database where the product type is NOT 'something' (i.e. display all product types except 'something')

Is this easy to do?

Thanks

#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 27 September 2006 - 05:19 PM

SELECT * FROM table WHERE column != 'something'

is that all you're after?
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 stualk

stualk
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 28 September 2006 - 11:03 AM

That's exactly what I wanted, works a treat. Didn't realise it was so simple but thanks for that. Useful for the future that.

Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users