A MySQL query that will match any combination of an array -
i have series of words in string/array combination of state/province, city , business name.
the state/province first value in list.
both business names , cities can single or multiple words.
for example: ca|anaheim|khs|ice|arena = khs ice arena in anaheim, ca
ca|anaheim|the|rinks|anaheim = rinks anaheim, anaheim ca
ca|los|angeles|pickwick|skating|rink
ny|manhatten|trump|center|skating|rink
qc|fond|du|lac|blue|line|family|ice|center
qc|fond|du|lac|spectrum|roller|skating|rink
there more cities businesses imagine efficient first find matches exist among business names. if none, end. if match or matches found among combination of words in array loop through combination or words find match or matches business name exists within particular city.
as tables , rows have 2 tables joined on zip combination:
tbl_location.location_id, tbl_location.location_name, tbl_location.location_zip
tbl_postal.location_city, tbl_postal.location_state, tbl.postal.zip, tbl_postal.location_lat, tbl_postal.location_lon
i need return:
tbl_location.location_id, tbl_location.location_name, tbl_postal.location_city, tbl_postal.location_state, tbl.postal.zip, tbl_postal.location_lat, tbl_postal.location_lon
what efficient way this? i'm stumped. in advance! ;)
Comments
Post a Comment