[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Complex/SQL Search help!
Hello all,
I have been trying to get a search to work all day. First let me
explain. I have a two tables my products table and a zip_zones table with
two columns zip and zone
I need to do a search on a user inputted zip to return which should return
the zone that it's in then do a lookup on the products table to match the
products in that zone. The docs say no nested searches allowed, so I have
to figure out how to do it with SQL
<psuedo code>
<input type="text" name="zip_code">
<input type="mv_sql_query" VALUE="
select * from products where zone = (
SELECT zone from zip_zone
where zip = zip_code
)">
All I get is an error usually stating "No match for zip_code" or invalid
search string "zip_code"
What am I missing?
Brian Kosick
Web Programmer
New Age Consulting Service, Inc.
216-619-2000
briank@nacs.net