Hello,
I have one form field - basically "Find Location by City, State or Zip". There needs to be just one form field.
I will have a DB backend that will do the "lookup"... What I'd like to do is have ColdFusion do a preliminary parsing of the value of the string submitted in the field... Basically to look at a delimited list of parts of the string where the delimiter is a "space"... I'd need to then look for things like - "if the first 5 characters are numeric, then I know it's a zip, so run the query by zip against a zip table (or column)... if not, then take the string and parse out possible City / State combinations and send those values against a query... Any thoughts on how I should approach this? I am thinking I may need to use string functions, and a loop list and maybe a temp query, but I am a little stuck on where to begin. Any thoughts?
Thanks!
I have one form field - basically "Find Location by City, State or Zip". There needs to be just one form field.
I will have a DB backend that will do the "lookup"... What I'd like to do is have ColdFusion do a preliminary parsing of the value of the string submitted in the field... Basically to look at a delimited list of parts of the string where the delimiter is a "space"... I'd need to then look for things like - "if the first 5 characters are numeric, then I know it's a zip, so run the query by zip against a zip table (or column)... if not, then take the string and parse out possible City / State combinations and send those values against a query... Any thoughts on how I should approach this? I am thinking I may need to use string functions, and a loop list and maybe a temp query, but I am a little stuck on where to begin. Any thoughts?
Thanks!