Avatar of pda4me
pda4me
 asked on

PHP/MySQL Query, NOT Include in results

I have the existing query that is working great.  How do I alter this query to make sure that any records where MLS = 1 is excluded?
$query_WADAmember = "SELECT MemberNumber, LastName, FirstName, `MemberE-mail`, MemberWebPage, Address, City, State, Zip, OfficeNameforAddress, FaxDialPhoneNumber, OfficePhoneNumber, ASSOC, MLS, APP, AFF FROM membership ORDER BY LastName ASC";

Open in new window

PHPMySQL ServerSQL

Avatar of undefined
Last Comment
Patrick Matthews

8/22/2022 - Mon
Patrick Matthews

$query_WADAmember = "SELECT MemberNumber, LastName, FirstName, `MemberE-mail`, MemberWebPage, Address, City, State, Zip, OfficeNameforAddress, FaxDialPhoneNumber, OfficePhoneNumber, ASSOC, MLS, APP, AFF FROM membership WHERE MLS <> 1 ORDER BY LastName ASC";


pda4me

ASKER
How about where MLS = 1 AND ASSOC = 0

basically i want to exclude any records where assoc column = 0 and mls = 1
ASKER CERTIFIED SOLUTION
Patrick Matthews

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck