Jump to content

Query - Select excluding record x


CanMan2004

Recommended Posts

Hi all

 

I've been trying to do a query which excludes a particular record, but cannot get it to work.

 

Basically I have a table called "users" and I want to query this table, but excluding all records which have "happy" in the field "type". I have been trying to get this to work using <> but have no luck.

 

My code is as follows

 

SELECT * FROM `users` WHERE `access` = '2' AND `type` <> 'happy'

 

Can anyone help?

 

Thanks in advance

 

Ed

Link to comment
https://forums.phpfreaks.com/topic/36909-query-select-excluding-record-x/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.