ldoozer Posted November 15, 2006 Share Posted November 15, 2006 Hi all, I am trying to extend my search criteria on my site. the site uses php and a mysql database.I have a field called postcode which contains postcodes such as:S1 2RBS6 3RKS11 7ABI have tried to query using the LIKE function ie:query = SELECT * FROM Activities WHERE ActDesc LIKE '%tennis%' AND PostCode LIKE 'S1%';However this returns both "S1 2RB" and "S11 7AB"is it possible within the query to differeciate between the two?Any help would be great.Many thankSteve Quote Link to comment https://forums.phpfreaks.com/topic/27375-sql-postcode-search/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.