Link to home
Start Free TrialLog in
Avatar of sjha81
sjha81

asked on

Query Issue: 2 form fields with min and max.

I keep getting the error: Syntax error (Missing operator) when I add 2 forms.  

search page---

      <select name="minprice">
      <option value="1"> no min </option>
            <option value="300000"> 300,000 </option>
      </select>  max

                 <select name="maxprice">
      <option value="9999999999"> no max </option>
      <option> 400,000 </option>

action page---

SELECT reals_id, zip.zip, city.city, state.state, price
FROM reals, zip, city, state
WHERE (0=0)
      AND reals.city = city.city_id
      AND reals.state = state.state_id
      AND reals.zip=zip.zip_id
-------------------------------------------------------------------
      AND reals.price GTE '#Session.minprice#'
      AND reals.price LTE '#Session.maxprice#'
--------------------------------------------------------------------
      AND city.city LIKE '#Session.scity#%'
      AND state.state LIKE '#Session.sstate#%'
      AND zip.zip LIKE '#Session.szip#%'

It works fine without the 2 lines of code in between the dashes...
I have a hunch I need to convert string to number

Any help will be greatly appreciated.




                        
ASKER CERTIFIED SOLUTION
Avatar of dgrafx
dgrafx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial