PDA

View Full Version : drop-down box result problem


gcapp
12-05-2002, 03:48 PM
Can someone explain to me what I am doing wrong??

If you go to this link:
Tax Rate Comparison (http://www.enchantedmountains.info/Cattaraugus/real-property/taxratecomp.asp?did=15)

and choose a town, the results will show the entire table, not the selected town.

I am doing something wrong with my results page but I am not sure.

I have attached the code for my search box page, which is correct and the code for the result page, which is incorrect.

If someone can explain to me what is wrong I would really appreciate it.

Gary

allida77
12-05-2002, 07:20 PM
sqlTRC="SELECT TaxComparison.Town, TaxComparison.Code, TaxComparison.TaxRate FROM TaxComparison WHERE TaxComparison.Town = '" & Request.Form("trc") & "'"


It is listing all rows because you are not matching search criteria in your sql.

whammy
12-06-2002, 01:33 AM
Just a tip - NEVER underestimate the importance of "WHERE" clauses... if you do an UPDATE without a WHERE clause, it will update EVERY record in your database. That is not a good thing (unless you really want to do that!).

:)