WHERE... AND... QUERY

OK - I know this should be simple but it is just not happening for me tonight.

$alfa=$_GET['alfa'];
$TableName="clients";
$Query="SELECT id FROM $TableName WHERE surname LIKE '$alfa%' AND case_number LIKE 'INV%' ";

I am trying to make a selection from a table to display results by initial letter of surname and case number starting with INV.

In the above example $alfa is the initial letter variable posted to this php page ie a, b, c etc.

While I am getting all the clients displayed with whatever initial letter $alfa is I am not getting case_number only starting with INV

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK - I got it sorted

There was a second instance further down the page that I missed that was screwing things up.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options