|
|
 |
 |
| |
| Looking
for : <%=keyword%> |
| |
<%
if len(keyword) > 0 then
qrySearch = "select * from products where prod_code like '%"& keyword &"%' or prod_describe like '%"& keyword &"%' or prod_detail like '%"& keyword &"%' order by prod_id desc"
set rsSearch = conn.execute(qrySearch)
if not rsSearch.eof then
if request("no") ="" then
pageno =1
else
pageno=request("no")
end if
total = rsSearch.recordcount
pagesize= 20
totalpage = total\pagesize
if (total mod pagesize) <> "0" then
totalpage= totalpage+1
else
totalpage = 0
end if
rsSearch.Move pagesize*(pageno-1)
a=1
if trim(pageno) <> trim(totalpage) then
endrecord = pagesize
else
endrecord=(total mod pagesize)
end if
For a=1 to endrecord
qryBand = "select * from bands where band_id = "& rsSearch("band_id") &""
set rsBand = conn.execute(qryBand)
if not rsBand.eof then
grp_id = rsBand("grp_id")
band_name = rsBand("band_name")
qryGrp = "select * from groups where grp_id = "& grp_id &""
set rsGrp = conn.execute(qryGrp)
if not rsGrp.eof then
grp_name = rsGrp("grp_name")
end if
set rsGrp = nothing
end if
set rsBand = nothing
%>
<%
rsSearch.movenext
next
set rsSearch = nothing
end if
else
response.write "Please check your keyword search ( keyword not must empty )"
end if
%>
| Found : <%=overall%> item(s) |
<%for ppp = 1 to totalpage%>
<%=ppp%>
<%next%>
|
|
| |
|
|