Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Filter records
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Filter records

 Post Reply Post Reply
Author
camenzka View Drop Down
Newbie
Newbie


Joined: 22 April 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote camenzka Quote  Post ReplyReply Direct Link To This Post Topic: Filter records
    Posted: 22 April 2003 at 2:40am
Hi

I am in the process of updating a site and I need to be able to filter the products from an SQL database to show in product code ascending order.

My knowledge and applications draw the line at Access so any help you can give me on the following code would be very helpful

Thanks

-------------------------------------------

<% Option Explicit %>
<!--#include file="top.inc" -->
<script language="JavaScript">
<!--
function doPopup() {
win = window.open('../help7.html','help','width=250,height=350');
}
//-->
</script>

<link rel="stylesheet" href="../default.css" type="text/css">

<TABLE WIDTH=712 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<TR>
<TD background="../images/layout_inside.jpg" COLSPAN=2>
<table width="97%" border="0" cellspacing="2" cellpadding="2" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<div align="center">
<table width="658" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="../images/cat_top.jpg" height="80">
<%
Dim objFS, thisFile, cfile, cfolder, cpic, cp2

cfolder = Request("set")
cpic = Request("pic")

cp2 = cpic

Response.write "<img src=""pics/0" & cpic & """ border='0' vspace='10' hspace='11'>"
%>
</td>
</tr>
<tr>
<td background="../images/cat_inside.jpg" valign="top">
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top">
<%

Dim str, allmenu, i, temparr
ReDim allmenu(0)

cfolder = Right(cfolder, 4)
cpic = Left(cpic, Len(cpic) - 3) & "jpg"

i = -1

cfile = "set" & cfolder & ".dta"


Set objFS = Server.CreateObject("Scripting.FileSystemObject")
Set thisFile = objFs.OpenTextFile(Server.MapPath("db_data\allsets") & "\" & cfile, 1)

Do While NOT thisFile.AtEndOfStream

i = i + 1
str = cStr(thisFile.ReadLine())
temparr = Split(str, "|")
ReDim Preserve allmenu(i)

allmenu(i) = temparr

Loop

thisFile.Close

Set thisFile = Nothing

Set objFS = Nothing

Dim a, b

a = Fix((RND(2) + 1) * 1000)
b = Fix((RND(a) + 1) * 1000)

%>
<%
Response.write "<br><img src=""pics/" & cpic & """ border=0></td><td width=""51%"" valign=""top"" halign = ""left""><font class='PMtitle'>Click to view: <BR><BR>"


Dim j
for j = 0 to i
Response.write "<a class='PMLinka' href=""catalog2.asp?set=AZK" & a & cfolder & "&id=kd" & b & allmenu(j)(0) & "&cpic=" & cp2 & """> <b>" & allmenu(j)(5) & "</b> " & allmenu(j)(1) & " </a><BR>"

Next

%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="../images/cat_bottom.jpg" valign="bottom" align="right" height="55">
<p><a href="javascript:history.back()"><img src="../images/cat_btn.jpg" width="107" height="54" border="0"></a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<!--#include file="bottom.inc" -->
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.