How to ignore a string during a query?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
ridshack
Forum Commoner
Posts: 29
Joined: Wed Oct 11, 2006 10:34 pm

How to ignore a string during a query?

Post by ridshack »

Hi,

I have a field with two types of names in it. One is just a name no spaces and the other is a email address. Im tring to query the field pulling out only the names that are not email addresses.

Any ideas on how I can ignore the names with the @domain.com?

Thank you,
Jason
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

NOT LIKE '%@domain.com' or, if the domain varies, a similar REGEXP statement.
ridshack
Forum Commoner
Posts: 29
Joined: Wed Oct 11, 2006 10:34 pm

Post by ridshack »

Its so easy once you know the answer... Thank you very much. Ill be looking up REGEXP.
Post Reply