Your current statement, with the OR, says to select a record if its name is not FIND_ME or if its name is not OPEN. That will be all of them. I expect you want all of them except the ones named FIND_ME and OPEN. So, you want AND instead of OR, because logically, "NOT (this OR that)" = "NOT this AND NOT that". Try

  SELECT * FROM $TableName
  WHERE machinename != 'FIND_ME' AND machinename != 'OPEN'

Alternatively, you could do

  SELECT * FROM $TableName
  WHERE machinename NOT IN ('FIND_ME', 'OPEN')

Michael

Hunter, Jess wrote:

Could someone have a look at this syntax and give me some guidance what I
may be overlooking?

SELECT * from $TableName WHERE machinename != 'FIND_ME' OR machinename !=
'OPEN'

I can make the statement work individually, but when I try to  add the 'OR'
statement it fails to 'remove' the designated records from the display page.
I have tried moving the 'FIND_ME' and 'OPEN' around and still get the same
results.

Any help would be appreciated

Jess

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/04




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



Reply via email to