mssql data retrieval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kencana
    New Member
    • Nov 2006
    • 26

    mssql data retrieval

    Hi all,

    I have a database which consists of address data. so there will be duplicate value of postal code. how ever each postal code contains different x and y value.
    what i want to do is to retrieve all the data by the building name and if there are similar building name i want to display it only once. i try to group it but since each record has different x and y...it return me error message.
    which is as follows:
    PHP Warning: mssql_fetch_arr ay(): supplied argument is not a valid MS SQL-result resource

    any idea of this?

    thank you

    regards,
    Kencana
  • b1randon
    Recognized Expert New Member
    • Dec 2006
    • 171

    #2
    Originally posted by kencana
    Hi all,

    I have a database which consists of address data. so there will be duplicate value of postal code. how ever each postal code contains different x and y value.
    what i want to do is to retrieve all the data by the building name and if there are similar building name i want to display it only once. i try to group it but since each record has different x and y...it return me error message.
    which is as follows:
    PHP Warning: mssql_fetch_arr ay(): supplied argument is not a valid MS SQL-result resource

    any idea of this?

    thank you

    regards,
    Kencana
    Use the LIKE keyword. I'm not sure how you have these x and y values...but if they're on the end of the postal code you can do sql like this:
    [PHP]
    SELECT * FROM address WHERE postal LIKE "19020%"
    [/PHP]

    Comment

    Working...