[RESOLVED] Get a specific list of postcodes with MySQL Like Operator
I have list of postcodes. And what i'm trying to do is get a listing of similar poscodes only.
So then $postcode1 strips all number from postcode, so for example E16 is strpped down to E only, then using the mysql query i get all the postcodes from database starting with E, problem is that i also get listing of postodes starting with EC, EN ... and i want postcodes sarting with E only.
$postcode1 = ereg_replace('[^A-Za-z]', '', $postcode);
SELECT * FROM coverparked WHERE postcode LIKE '$postcode1%' ORDER BY postcode
Tried some options but i can't get to make it work..
Can you help me out here please ..
Thanks a lot in advance in advance.