|
i have
<%
if request("direction") = "" or request("direction") = "asc" then
direction="asc"
direction_opp="desc"
else
direction="desc"
direction_opp="asc"
end if
sSQL = "select * from search "
'Restriction
if request("search") <> "" then
sSQL = sSQL & " where quote like '%" & replace(request("search"), "'", "''") & "%' or author like '%" & replace(request("search"), "'", "''") & "%'"
end if
'Order
if request("order") = "1" then
sSQL = sSQL & " order by id "&direction
end if
if request("order") = "2" then
sSQL = sSQL & " order by quote "&direction
end if
if request("order") = "3" then
sSQL = sSQL & " order by author "&direction
end if
open_recordset rs,sSQL%>
i have a databse name "search"
i fetch the database using this script. but i have putted buttons in my database fields. so every time this script fetches the database it fetches button script also...
now
i want to.....
when the user ckicks that buttoon i want to relod the same page but with the different sql statment
so that the database will chage......
how i can do this ????
or is there any other technique to do this other than fetching the button to change the database(sql statement) in the same page???????
__________________
me people say that I must be a horrible person, but that's not true. I have the heart of a young boy -- in a jar on my desk.
|