mysql and postal code

Discussion in 'MySQL' started by levikay, Dec 25, 2008.

  1. #1
    Hi guys i have a list of users with their postal code,
    i was wondering if some on can help with logic behind searching for an area.
    for ex.
    if a visitor want to know if there are any users in an area "k3k 4k3" I want it return all users with a postal code that starts with "K3K"

    Thanks for you help
    and happy holidays
    Cheers
     
    levikay, Dec 25, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    SELECT * FROM table_name WHERE postal_code LIKE 'k3k%';
    Code (markup):
     
    mwasif, Dec 26, 2008 IP
  3. levikay

    levikay Active Member

    Messages:
    294
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    68
    #3
    Thanks man
    This will help me
     
    levikay, Dec 26, 2008 IP