alternate SQL in asp page

R

Raphael Gluck

Hi i am wondering if anyone can help
I am testing a site i am building (still in building stages!)
The problem is with my products, that on some pages, there are too many
products, and i want to have a futher of of a page for such products

take a look for example

http://www.tripak.me.uk/index.asp

if you leaf through any product, on the final page (listing.asp) the product
is available to you in 5-10 variants, but say if you click on something like
cartons and corrugated rolls, and follow thru cartons and single wall
cartons, i have too many results, and this will bore the user.

Can anyone help me? i will explain how my DB is structured and what i think
can be done, i just dont know how to do it.

thanks

Raphael
 
R

Ray at

I personally like being able to see all the options on one page, but you may
want to break them up to look a little more friendly, like:




Length up to 200mm
1049 127mm x 127mm x 127mm
1050 152mm x 127mm x 102mm
1051 152mm x 152mm x 152mm
1052 178mm x 178mm x 178mm
1053 190mm x 152mm x 89mm
etc.

Length from 200mm to 300mm
1081 250mm x 200mm x 200mm
1082 250mm x 250mm x 100mm
1083 254mm x 254mm x 254mm
etc.

Length from 300mm to 400mm
1126 300mm x 200mm x 170mm
1127 300mm x 250mm x 200mm
1128 300mm x 300mm x 300mm
1129 305mm x 229mm x 152mm
1130 305mm x 229mm x 229mm
etc.

Ray at work
 
R

Ray at

p.s. I am moving next week. Would you please send me 5000 1539's please.
Thanks. :p

Ray at work
 
R

Raphael Gluck

Hey Ray thanks for that

It seems that you more than understood my problem
Indeed i have a furhter table, taht i am trying to incoroporate onto my
page, this would be an alternate SQL so when you have something like
cartons, you are presented with options just the way you put it, "length
upto 200mm" etc..

Do you know how to incorporate that SQL if i showed you the code? and how to
alternate with an IF clause? i am using a wsyiwyg editor. I know!! I am
still learning

Thanks

Raphael
 
R

Ray at

Post the _relevant_ code _snippet_ and we'll see if we can make any sense
out of it.

Ray at work
 
R

Ray at

I've modified a bit of the code here. My modifications are in CAPITAL
letters so you can see the difference. I didn't test or proofread! This
starts where you .txt link that you posted starts at line 181.

Ray at work

<%
SOLD_TEXT_SPEC = ""

While ((Repeat1__numRows <> 0) AND (NOT rsListing.EOF))
STEXT_SPEC = RSLISTING.FIELDS.ITEM("Text_Spec").VALUE


IF STEXT_SPEC <> SOLD_TEXT_SPEC THEN


%>

<TR>
<TD COLSPAN="3" ALIGN="CENTER"><B><%=STEXT_SPEC%></B></TD>
</TR>
<% END IF %>
<table width="60%" border="0" align="center">
<%If (Repeat1__numRows Mod 2) Then%>
<tr style="background-color:#FFF960">
<%Else%>
<tr class="listing" style="background-color:#FFF990">
<%End If%>
<td width="33%" nowrap><div align="left"><font
size="1"><%=(rsListing.Fields.Item("Inventory_ID").Value)%></font></div>
</td>
<% if isnull(rsListing("DescrMetric")) then %>
<td width="33%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Product_Name").Value)%></font></td>
<%End If%>
<% if not isnull(rsListing("Text_Spec")) then %>
<td width="33%" nowrap><font size="1">LEAVE BLANK OR DELETE THIS TD
ALTOGETHER</font></td>
<% end if %>
<td width="33%" nowrap><div align="center"><font
size="1"><%=(rsListing.Fields.Item("DescrMetric").Value)%></font></div>
</td>
<% if not isnull(rsListing("Color")) then %>
<td width="0%" nowrap>
<div align="center"><font size="1">
<%=(rsListing.Fields.Item("Color").Value)%> </font></div>
</td>
<% end if %>
<% if not isnull (rsListing("Grades")) then %>
<td width="0%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Grades").Value)%></font></td>
<% end if %>
<% if not isnull (rsListing("Specific_image")) then %>
<td width="0%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Specific_image").Value)%></font></td>
<% end if %>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsListing.MoveNext()

SOLD_TEXT_SPEC = STEXT_SPEC
Wend
%>
 
R

Ray at

Put links to the headers (300 to 400) like:

<A href="thissamepage.asp?size=300-400">Click here to see 300 to 400 mm
cartons.</A>


Then modify your SQL so it's like:

Select Case Request.Querystring("size")
Case "300-400"
sSQL = sSQL & " WHERE TheColumnThatHoldsBoxSizeRange='300 to 400
mm'"
Case 600-800
sSQL = sSQL & " WHERE TheColumnThatHoldsBoxSizeRange='600 to 800
mm'"
End Select

Are you familiar with WHERE clauses?

Ray at home
 
R

Raphael Gluck

Well i am a little familiar with WHERE clauses, but i dont think what you
suggested is an option for me here.
I was quoting cartons as an example of a product that needs that extra bit
of a recordset. but there are other examples too.
Most of my products dont need that option, but a sizeable amount do, though.
I think what you were suggesting was to create manual links, that are unique
to every product. I guess that's against the laws of dynamic content. If you
wish I could send you my DB so you could get a better idea. I can compact it
to around 130k.

thanks for your help thus far

Enjoy the rest of your day

Raphael
 
R

Raphael Gluck

Sorry sir,
I wasnt suggesting sending you my database, so that you should modify it for
me, I just merely thought it would give you a better understanding of what i
was trying to achieve.
I'm sorry for the misunderstanding
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top