Jump to content

[SOLVED] query retriving wrong records


geroido

Recommended Posts

Hi

Can you see where the problem is with this query. It seems straightforward but is not working. There are no records in my database for the county 'Enniskillen' but it is retrieving all records where servType = 'Delivery only'. So it is getting records from the other counties who match Delivery only. I expect it to first look to see if Enniskillen exists, then if it does check that registered = 'yes', then give me all of those restaurants whose ServType = 'Delivery and restaurant booking' and servtype = 'Delivery only'. 

 

select clientID, busname, strAddr1, strAddr2, towncity, county, servType, registered FROM clientdetails where towncity = 'Enniskillen' and registered = 'yes' and servType = 'Delivery and restaurant booking' and servtype = 'Delivery only' 

Link to comment
https://forums.phpfreaks.com/topic/121988-solved-query-retriving-wrong-records/
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.