Tech Support banner

1 - 2 of 2 Posts

·
Elite Commander
Joined
·
1,415 Posts
Discussion Starter · #1 ·
Hi all,
I am trying to get the following statement to work, however it still pulls out any operator classed as private-

Code:
$query = "SELECT DISTINCT operator FROM spotting WHERE spotting.uname = 'david' and operator LIKE 'p%'  and operator <> 'Private%' ORDER BY operator asc";
I have tried swapping the LIKE statements to

Code:
and operator <> 'Private%' AND operator LIKE 'p%'
Neither have worked.
I have the following in the spotting table on the operator's field

Private Owner
Private
Peagusus
Partnavia
Puma Aircraft

However what I would like it for the above statement to filter out the private entires, so that I would be left with

Peagusus
Partnavia
Puma Aircraft

Where am I going wrong? Can someone please point me in the right direction
 
1 - 2 of 2 Posts
Top