Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Tree query

    Hi,
    I'm gonna ask this in a different way to see if it gets a different
    response.

    I am building a page that queries two access tables. It is in fact two
    quiries in one as I want to do this.
    Tables consist of the following.

    Table 1: TeamID Team
    Table 2: PlayerID Player Team

    SELECT Player FROM Table2
    WHERE Team = (SELECT Team FROM Table1)

    What I want it to do is this.

    Team1
    Player1
    Player2
    Player3
    Player4
    Team2
    Player5
    Player6
    Player7
    Team3
    Player8
    Player9
    Team4
    Player10
    Player11
    Player12
    Player13


    Can anyone please help me sort this. I'm starting to think that maybe this
    could or should be done with a variable for the last bit of the query.




    Pete Casey Guest

  2. Similar Questions and Discussions

    1. Query of Queries on query New type query
      In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could...
    2. Query of Query LIKE and Wild Card chars
      I am tyring to use the 'LIKE' comparison within a Query of Query. The Query is shown below. <cfquery dbtype="query" name="GetFileList"> select...
    3. Convert a query to a list, or find an item in a query
      Hi All, I am using CFPOP to retrieve mail from a server, then delete each message after I retrieve it. What I want to do is to check that I don;t...
    4. CAML Query: Multiple Query Fields Issue
      I need to Create a CAML Query Dynamically with VB to a Sharepoint WebService GetListItems Method. The User Could Select 1 to X Number of IDs...
    5. BCP query out executed by xp_cmdshell works fine from query analyzer but fails from VB Component
      Hi all, I have a stored procedure which returns a vast number of record and i have to write the output into a csv file. I'm using BCP utility to...
  3. #2

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:b59jc.672$VA1.447@doctor.cableinet.net...
    > Hi,
    > I'm gonna ask this in a different way to see if it gets a different
    > response.
    >
    > I am building a page that queries two access tables. It is in fact two
    > quiries in one as I want to do this.
    > Tables consist of the following.
    >
    > Table 1: TeamID Team
    > Table 2: PlayerID Player Team
    >
    > SELECT Player FROM Table2
    > WHERE Team = (SELECT Team FROM Table1)
    >
    > What I want it to do is this.
    >
    > Team1
    > Player1
    > Player2
    > Player3
    > Player4
    > Team2
    > Player5
    > Player6
    > Player7
    > Team3
    > Player8
    > Player9
    > Team4
    > Player10
    > Player11
    > Player12
    > Player13
    >
    >
    > Can anyone please help me sort this. I'm starting to think that maybe this
    > could or should be done with a variable for the last bit of the query.
    Try the following; watch for word-wrap:

    SELECT * FROM Table1
    INNER JOIN Table2 ON Table2.Team = Table1.Team
    ORDER BY Table1.Team, Table2.Player

    [ Of course, others will say "Don't use 'SELECT *'"... ]

    though the following may work as the need for Table1 isn't clear?

    SELECT Team, Player FROM Table2 ORDER BY Team, Player


    McKirahan Guest

  4. #3

    Default Re: Tree query

    Thanks alot for your input McKirahan.
    I tried your suggestion but it is returning no data at all.
    I've spent nearly a whole day trying to figure this out. I had got it almost
    working by using a variable to generate a an individual list for each entry
    in Table 1
    Any more suggestions would be welcome.


    Pete Casey Guest

  5. #4

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:Tyajc.1256$VA1.691@doctor.cableinet.net...
    > Thanks alot for your input McKirahan.
    > I tried your suggestion but it is returning no data at all.
    > I've spent nearly a whole day trying to figure this out. I had got it
    almost
    > working by using a variable to generate a an individual list for each
    entry
    > in Table 1
    > Any more suggestions would be welcome.

    Did you try this?

    SELECT Team, Player FROM Table2 ORDER BY Team, Player


    McKirahan Guest

  6. #5

    Default Re: Tree query


    That brings in the correct information but every "player" entry has it
    relevant "team" entry alongside it. I want a team header then all the
    players in that team, then the same for the next team, and so on. It's
    proving to be somewhat awkward for me.
    A friend of mine said I need a nested SQL query inside the main one.
    Not sure if thats right or not.


    Pete Casey Guest

  7. #6

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:b59jc.672$VA1.447@doctor.cableinet.net...
    > Hi,
    > I'm gonna ask this in a different way to see if it gets a different
    > response.
    >
    > I am building a page that queries two access tables. It is in fact two
    > quiries in one as I want to do this.
    > Tables consist of the following.
    >
    > Table 1: TeamID Team
    > Table 2: PlayerID Player Team
    >
    > SELECT Player FROM Table2
    > WHERE Team = (SELECT Team FROM Table1)
    >
    > What I want it to do is this.
    >
    > Team1
    > Player1
    > Player2
    > Player3
    > Player4
    > Team2
    > Player5
    > Player6
    > Player7
    > Team3
    > Player8
    > Player9
    > Team4
    > Player10
    > Player11
    > Player12
    > Player13
    >
    >
    > Can anyone please help me sort this. I'm starting to think that maybe
    this
    > could or should be done with a variable for the last bit of the query.
    Can you provide database, version, data definition language (CREATE
    TABLE ...),sample data and desired output? You should be able to
    accomplish team header data intermingled with player data by using a
    union query.

    SELECT
    U.Display
    FROM
    (
    SELECT
    0 AS RowType,
    Team,
    Team AS Display
    FROM
    [Table 1]
    UNION ALL
    SELECT
    1,
    Team,
    Player
    FROM
    [Table 2]
    ) AS U
    ORDER BY
    Team,
    RowType,
    Display

    HTH
    -Chris Hohmann








    Chris Hohmann Guest

  8. #7

    Default Re: Tree query

    Hi Chris,

    I'm using Access 2000 (9.0.4402 SR-1)

    Here is my include file (Boot_Conn.asp)

    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_Boot_Conn_STRING
    MM_Boot_Conn_STRING = "dsn=Boot;"
    %>


    Here is my recordset code.

    <!--#include file="Connections/Boot_Conn.asp" -->

    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_Boot_Conn_STRING
    Recordset1.Source = "Blah Blah B;ah"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    Recordset1_numRows = 0
    %>



    The database consists of several tables but the two we are concerned with
    are called "T_Area" and "T_section"

    T_Area consists of columns "AreaID" and "area"
    T_section consists of three columns "SectionID", "AreaID" and "section"

    The column "AreaID" in T_section is a lookup column, which gets its data
    from T_Area displaying "section"

    I want to end up with this idea;

    Family
    Babies
    Clothes
    Health & Beauty
    Animals & Pets
    Presents
    Kids Stuff

    Sport & Leisure
    Arts
    Hobbies
    Audio
    Video
    Photography
    Camping & Caravanning
    Sport
    Music

    Office & Business
    Furniture
    Office Supplies
    Office Equipment

    .....and so on.

    Family,Sport & Leisure and Office & Business come from T_Area
    Babies, Clothes,Health & Beauty, Animals & Pets, Presents, Kids Stuff, etc
    come from T_section.

    I hope this is enough to allow you see my problem.
    I thank you for your time and help.
    Pete



    Pete Casey Guest

  9. #8

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:47cjc.1591$VA1.872@doctor.cableinet.net...
    >
    > That brings in the correct information but every "player" entry has it
    > relevant "team" entry alongside it. I want a team header then all the
    > players in that team, then the same for the next team, and so on. It's
    > proving to be somewhat awkward for me.
    > A friend of mine said I need a nested SQL query inside the main one.
    > Not sure if thats right or not.

    Your logic just needs to "break" when there's a change in "Team"; it's not
    an SQL issue.

    For example,


    Dim TeamSave
    TeamSave = ""
    Do Until rs.EOF
    If TeamSave <> rs("Team") Then
    '... display Team heading
    Response.Write("<br><br>Team = " & rs("Team"))
    TeamSave = rs("Team")
    End If
    '... display Player
    Response.Write("<br>Player = " & rs("Player"))
    Loop


    McKirahan Guest

  10. #9

    Default Re: Tree query

    Where do you suggest that code goes. Is that to form part of the Query or
    does it appear elsewhere on the page?


    Pete Casey Guest

  11. #10

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:iLrjc.2124$VA1.1688@doctor.cableinet.net...
    > Where do you suggest that code goes. Is that to form part of the Query or
    > does it appear elsewhere on the page?

    Too see if/how it works, insert it after you execute the SQL statement.

    The only reason you'd want to use Table1 (Teams) is to identify Teams that
    do not have Players; otherwise, you can use the simpler SQL statement I
    suggested.


    McKirahan Guest

  12. #11

    Default Re: Tree query

    Hi,

    I've finally got it working. Just have to get the formatting sorted now and
    also make these "Player" links pass a URL Parameter to the next page.
    Formatting a dynamically produced table is not straight forward is it?

    Anyway, thanks for all your help on this problem. I would not have got it
    sorted so quickly without your help.
    Cheers
    Pete


    Pete Casey Guest

  13. #12

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:Oqxjc.5$_v1.0@doctor.cableinet.net...
    > Hi,
    >
    > I've finally got it working. Just have to get the formatting sorted now
    and
    > also make these "Player" links pass a URL Parameter to the next page.
    > Formatting a dynamically produced table is not straight forward is it?
    >
    > Anyway, thanks for all your help on this problem. I would not have got it
    > sorted so quickly without your help.
    > Cheers
    > Pete
    What I usually do is to separate the processing into:

    1) Database processing: open and read the selected recordset fields into
    an array

    2) Report processing: iterate through the array to format an HTML report


    I also use the following to make it easier:

    '*
    '* Declare variables used exclusively by "Append()" and "Concat()".
    '*
    Dim arrSTR()
    ReDim arrSTR(100)
    Dim intSTR
    intSTR = 0

    Sub Append(strVAL)
    '**
    ================================================== ========================='
    '* Append()
    '*
    '* Appends strings to array entries redimensioning as needed; (see
    "Concat()").
    '**
    ================================================== ========================='
    strVAL = strVAL & ""
    If intSTR > UBound(arrSTR) Then ReDim Preserve arrSTR(UBound(arrSTR) +
    100)
    arrSTR(intSTR) = strVAL & vbCrLf
    intSTR = intSTR + 1
    End Sub

    Function Concat()
    '**
    ================================================== ========================='
    '* Concat()
    '*
    '* Concatenates array entries into a single string; (see "Append()").
    '**
    ================================================== ========================='
    Redim Preserve arrSTR(intSTR)
    Concat = Replace(Join(arrSTR, ""),"`",Chr(34))
    Erase arrSTR
    ReDim arrSTR(100)
    intSTR = 0
    End Function

    Then I do things like:

    Append "<html>"
    Append "<head>"
    Append "<title>test.htm</title>"
    Append "</head>"
    Append "<body>"
    Append "<img src=`logo.gif` border=`0` width=`100` height=`100`
    alt=`Logo`>"
    Append "</body>"
    Append "</html>"

    Response.Write Concat()

    This avoids the over use of "Response.Write".


    McKirahan Guest

  14. #13

    Default Re: Tree query

    I'm afraid you've completely lost me there. Looks interesting though.


    Pete Casey Guest

  15. #14

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:o1Bjc.574$633.511@doctor.cableinet.net...
    > I'm afraid you've completely lost me there. Looks interesting though.

    Just cut-and-paste the following into a file called "test.asp"
    (watch for word-wrap), upload it to a Web server, and run it.

    If you're running PWS or IIS on your PC, place it in under
    "c:\inetpub\wwwroot\" and run "http://localhost/test.asp".


    <%@ Language = "VBScript" %>
    <% Option Explicit
    '*
    '* Declare variables used by "Append()" and "Concat()".
    '*
    Dim arrSTR()
    ReDim arrSTR(100)
    Dim intSTR
    intSTR = 0
    '*
    '* Generate and display a Web page
    '*
    Append "<table>"
    Append "<tr>"
    Append " <th align=`left`>Name<hr></th>"
    Append " <th align=`left`>E-mail<hr></th>"
    Append "</tr>"
    Append "<tr>"
    Append " <td>Pete Casey</td>"
    Append " <td>oipete@blueyonder.co.uk</td>"
    Append "</tr>"
    Append "</table>"
    Response.Write Concat()

    Sub Append(strVAL)
    '**
    '* Append()
    '*
    '* Appends strings to array entries ReDim as needed; see "Concat()".
    '**
    strVAL = strVAL & ""
    If intSTR > UBound(arrSTR) Then
    ReDim Preserve arrSTR(UBound(arrSTR) + 100)
    End If
    arrSTR(intSTR) = strVAL & vbCrLf
    intSTR = intSTR + 1
    End Sub

    Function Concat()
    '**
    '* Concat()
    '*
    '* Concatenates array entries into a string; see "Append()".
    '**
    Redim Preserve arrSTR(intSTR)
    Concat = Replace(Join(arrSTR, ""),"`",Chr(34))
    Erase arrSTR
    ReDim arrSTR(100)
    intSTR = 0
    End Function
    %>


    McKirahan Guest

  16. #15

    Default Re: Tree query

    Ok, so I see what it does, but how is hocus pocus to me. I have however
    figured out that you need to change some " quotes to ' in asp which has
    allowed me to format my list.

    Now all I need to do is incorporate


    <A HREF="Buy_detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) &
    "CategoryName=" & Recordset1.Fields.Item("CategoryName").Value
    %>"><%=(Recordset1.Fields.Item("CategoryName").Val ue)%></A>


    to make whats written on the page a link which passes the URL Parameter to
    the next page into what I currently have.


    Response.Write("<td valign='top'><p>" & Recordset1("CategoryName") &
    "</p></td><tr></tr>")


    How in gods name do I do that?
    You must rattle this stuff off daily based on what I've seen you send
    me...lol

    Cheers


    Pete Casey Guest

  17. #16

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:ncKjc.808$3f.558@pathologist.blueyonder.net.. .
    > Ok, so I see what it does, but how is hocus pocus to me. I have however
    > figured out that you need to change some " quotes to ' in asp which has
    > allowed me to format my list.
    >
    > Now all I need to do is incorporate
    >
    >
    > <A HREF="Buy_detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) &
    > "CategoryName=" & Recordset1.Fields.Item("CategoryName").Value
    > %>"><%=(Recordset1.Fields.Item("CategoryName").Val ue)%></A>
    >
    >
    > to make whats written on the page a link which passes the URL Parameter to
    > the next page into what I currently have.
    >
    >
    > Response.Write("<td valign='top'><p>" & Recordset1("CategoryName") &
    > "</p></td><tr></tr>")
    >
    >
    > How in gods name do I do that?
    > You must rattle this stuff off daily based on what I've seen you send
    > me...lol
    >
    > Cheers

    Try the following; watch for word-wrap:

    Dim sCATN
    sCATN = "<%=Recordset1.Fields.Item("CategoryName").Value%> "
    ' or
    ' sCATN = "<%=Recordset1("CategoryName").Value%>"
    ' or
    ' sCATN = "<%=Recordset1("CategoryName")%>"
    Dim sHREF
    sHREF = "<a href='Buy_detail.asp?"
    sHREF = sHREF & "<%=MM_keepNone & MM_joinChar(MM_keepNone)%>"
    sHREF = sHREF & "CategoryName=" & sCATN & "'>"
    sHREF = sHREF & sCATN & "</a>"
    ' Response.Write(sHREF)
    ' uncomment the above line to see if the <a> tag looks right.
    Dim sHTML
    sHTML = "<table border='0'>"
    sHTML = strHTML & "<tr>"
    sHTML = strHTML & "<td valign='top'>"
    sHTML = strHTML & sHREF
    sHTML = strHTML & "</td>"
    sHTML = strHTML & "</tr>"
    sHTML = strHTML & "</table>"
    Response.Write(sHTML)


    I don't know what "MM_keepNone" and "MM_joinChar(MM_keepNone)" are.
    I suspect that you'll want an "&" before "CategoryName=".


    McKirahan Guest

  18. #17

    Default Re: Tree query

    "McKirahan" <News@McKirahan.com> wrote in message
    news:5CNjc.4799$lz5.757621@attbi_s53...
    > "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    > news:ncKjc.808$3f.558@pathologist.blueyonder.net.. .
    > > Ok, so I see what it does, but how is hocus pocus to me. I have however
    > > figured out that you need to change some " quotes to ' in asp which has
    > > allowed me to format my list.
    > >
    > > Now all I need to do is incorporate
    > >
    > >
    > > <A HREF="Buy_detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) &
    > > "CategoryName=" & Recordset1.Fields.Item("CategoryName").Value
    > > %>"><%=(Recordset1.Fields.Item("CategoryName").Val ue)%></A>
    > >
    > >
    > > to make whats written on the page a link which passes the URL Parameter
    to
    > > the next page into what I currently have.
    > >
    > >
    > > Response.Write("<td valign='top'><p>" & Recordset1("CategoryName") &
    > > "</p></td><tr></tr>")
    > >
    > >
    > > How in gods name do I do that?
    > > You must rattle this stuff off daily based on what I've seen you send
    > > me...lol
    > >
    > > Cheers
    >
    >
    > Try the following; watch for word-wrap:
    >
    > Dim sCATN
    > sCATN = "<%=Recordset1.Fields.Item("CategoryName").Value%> "
    > ' or
    > ' sCATN = "<%=Recordset1("CategoryName").Value%>"
    > ' or
    > ' sCATN = "<%=Recordset1("CategoryName")%>"
    > Dim sHREF
    > sHREF = "<a href='Buy_detail.asp?"
    > sHREF = sHREF & "<%=MM_keepNone & MM_joinChar(MM_keepNone)%>"
    > sHREF = sHREF & "CategoryName=" & sCATN & "'>"
    > sHREF = sHREF & sCATN & "</a>"
    > ' Response.Write(sHREF)
    > ' uncomment the above line to see if the <a> tag looks right.
    > Dim sHTML
    > sHTML = "<table border='0'>"
    > sHTML = strHTML & "<tr>"
    > sHTML = strHTML & "<td valign='top'>"
    > sHTML = strHTML & sHREF
    > sHTML = strHTML & "</td>"
    > sHTML = strHTML & "</tr>"
    > sHTML = strHTML & "</table>"
    > Response.Write(sHTML)
    >
    >
    > I don't know what "MM_keepNone" and "MM_joinChar(MM_keepNone)" are.
    > I suspect that you'll want an "&" before "CategoryName=".

    Oops, I forgot to adjust for the quotes in sCATN; for example:

    sCATN = '<%=Recordset1("CategoryName")%>'




    McKirahan Guest

  19. #18

    Default Re: Tree query

    I'm sorry, I've tried allsorts with that with no luck whatever. Where
    exactly should I be putting that. Heres my code for the entire page.
    I feel like a six year old trying to work his way through astro nuclear
    physics....lol.


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="Connections/Boot_Conn.asp" -->
    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_Boot_Conn_STRING
    Recordset1.Source = "SELECT [T_Group].[Group], [T_Categories].[CategoryName]
    FROM T_Group INNER JOIN T_Categories ON [T_Group].[GroupID]
    =[T_Categories].[GroupID] ORDER BY Group"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    Recordset1_numRows = 0
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL
    and Form parameters

    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth

    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem

    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
    MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If

    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""

    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
    MM_nextItem = "&" & MM_item & "="
    If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem &
    Server.URLencode(Request.QueryString(MM_item))
    End If
    Next

    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
    MM_nextItem = "&" & MM_item & "="
    If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem &
    Server.URLencode(Request.Form(MM_item))
    End If
    Next

    ' create the Form + URL string and remove the intial '&' from each of the
    strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
    MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "") Then
    MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
    MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If

    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
    If (firstItem <> "") Then
    MM_joinChar = "&"
    Else
    MM_joinChar = ""
    End If
    End Function


    %>
    <html><!-- InstanceBegin template="/Templates/Other_bs.dwt.asp"
    codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <!-- InstanceBeginEditable name="head" -->
    <link href="Site_css.css" rel="stylesheet" type="text/css">
    <!-- InstanceEndEditable -->
    <link href="Site_css.css" rel="stylesheet" type="text/css">
    </head>

    <body>
    <table width="100%" height="100%" border="0" cellpadding="0"
    cellspacing="0">
    <tr>
    <td valign="bottom">
    <table width="100%" border="0" cellpadding="0" cellspacing="0"
    class="TopBox">
    <tr>
    <td width="405" height="50"><a href="index.asp"><img
    src="Images/Logo1.jpg" alt="The Dry Boot Sale.co.uk" width="464" height="50"
    border="0"></a></td>
    <td valign="bottom">
    <div align="right">
    <p>Contact Us | Terms | Help </p>
    </div></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td height="3" background="Images/TwinBar.jpg" class="MidBox"><img
    src="Images/TwinBar.jpg" width="1" height="3"></td>
    </tr>
    <tr>
    <td height="375" valign="top" bgcolor="#FFFFFF"> <div
    align="left"></div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0"
    class="MidBox">
    <tr>
    <td width="120" height="386" valign="top"
    background="Images/Border_L.jpg">
    <table width="120" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>&nbsp;</td>
    <td width="106" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
    <td width="44"><img src="Images/Pound_L.jpg" alt="Buy"
    name="Buy" width="44" height="60" id="Buy"></td>
    <td nowrap background="Images/Pound_R.jpg"><p><a
    href="Buy.asp">Buy</a></p></td>
    </tr>
    <tr>
    <td><img src="Images/Pound_L.jpg" alt="Sell" name="Sell"
    width="44" height="60" id="Sell"></td>
    <td nowrap background="Images/Pound_R.jpg"><p><a
    href="LoginS.asp">Sell</a></p></td>
    </tr>
    <tr>
    <td><img src="Images/Pound_L.jpg" alt="Search" name="Search"
    width="44" height="60" id="Search"></td>
    <td nowrap background="Images/Pound_R.jpg"><p><a
    href="Search.asp">Search</a></p></td>
    </tr>
    <tr>
    <td><img src="Images/Pound_L.jpg" alt="Rent a Table"
    name="RentaTable" width="44" height="60" id="RentaTable"></td>
    <td nowrap background="Images/Pound_R.jpg"><p><a
    href="Rent_Table.asp">Rent
    Table</a></p></td>
    </tr>
    <tr>
    <td><img src="Images/Pound_L.jpg" alt="My Table"
    name="MyTable" width="44" height="60" id="MyTable"></td>
    <td nowrap background="Images/Pound_R.jpg">
    <p><a href="Login.asp">My Table</a></p></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    </table></td>
    <td><table width="100%" height="375" border="0" cellpadding="0"
    cellspacing="0" class="BodyBox">
    <tr>
    <td width="100%" valign="top"> <br>
    <!-- InstanceBeginEditable name="PageHeader" -->
    <h1>Looking for Something to Buy?</h1>
    <!-- InstanceEndEditable --><!-- InstanceBeginEditable
    name="PageBody" -->
    <table width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td valign="top"> <p>Please select an area that you
    would
    expect to find the type of thing you are looking
    for.
    If you can't find what you want, you may wish to
    do
    a <a href="Search.asp">search</a> instead. Another
    reason
    is that perhaps nobody is trying to sell what you
    want
    just now</p>
    <table width="200" border="0" align="center"
    cellpadding="0" cellspacing="0" class="AdBox">
    <tr>
    <td valign="top">
    <%
    Dim Cascade
    Cascade = ""
    Do Until Recordset1.EOF
    If Cascade <> Recordset1("Group") Then
    '... display Group heading
    Response.Write("<tr><td>&nbsp;</td></tr><tr><td valign='top'><h2>" &
    Recordset1("Group") & "</td></tr>")
    Cascade = Recordset1("Group")
    End If
    '... display Category
    Response.Write("<td valign='top'><p>" &
    Recordset1("CategoryName") & "</p></td><tr></tr>")
    Recordset1.MoveNext
    Loop
    %>
    </td>
    </tr>
    </table>

    </td>
    </tr>
    </table>
    <p>&nbsp;</p>
    <!-- InstanceEndEditable --></td>
    </tr>
    </table></td>
    <td width="292" align="right" valign="top"><img
    src="Images/Wet_Dry_Cut.jpg" width="292" height="25"><br>
    <table width="50%" height="100%" border="0" cellpadding="0"
    cellspacing="0" class="AdBox">
    <tr>
    <td valign="top"><!-- InstanceBeginEditable
    name="RightAds" -->
    <p>RightAds</p>
    <!-- InstanceEndEditable --></td>
    </tr>
    </table> </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td height="3" background="Images/TwinBar.jpg" class="MidBox"><img
    src="Images/TwinBar.jpg" width="1" height="3"></td>
    </tr>
    <tr>
    <td valign="top"><table width="100%" border="0" cellpadding="0"
    cellspacing="0" class="BotBox">
    <tr>
    <td width="214" valign="top">
    <p><img src="Images/Wet_Dry_Cut_Bott_L.jpg" width="214"
    height="49">
    </p>
    </td>
    <td valign="top"><p align="center"><a href="Buy.asp">Buy</a> | <a
    href="Sell.asp">Sell</a>
    | <a href="Search.asp">Search</a> | <a
    href="Rent_Table.asp">Rent
    a Table</a> | <a href="My_table.asp">My Table</a><br>
    Contact Us | Terms &amp; Conditions | Help</p></td>
    <td width="214" valign="top"><img
    src="Images/Wet_Dry_Cut_Bott_R.jpg" width="214" height="49"></td>
    </tr>
    </table><p>&nbsp;</p></td>
    </tr>
    </table>
    </body>
    <!-- InstanceEnd --></html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>



    Pete Casey Guest

  20. #19

    Default Re: Tree query

    "Pete Casey" <oipete@blueyonder.co.uk> wrote in message
    news:ibSjc.896$El2.835@pathologist.blueyonder.net. ..
    > I'm sorry, I've tried allsorts with that with no luck whatever. Where
    > exactly should I be putting that. Heres my code for the entire page.
    > I feel like a six year old trying to work his way through astro nuclear
    > physics....lol.

    I don't know where it goes; you just gave me some code that I showed you a
    different way to format.


    Not quite the "entire Page" as the source code for the include and style
    sheet are missing.

    Also, "Site_css.css" is declared twice.

    Why all the "<!-- Instance" prefixed lines?

    Why all the "MM_" prefixed items (which don't seem to be referenced)?

    Are you developing this using Macromedia Dreamweaver?

    Is there a URL where this code is posted.

    Is there a "spec"; that is, a description of what's supposed to happen?



    McKirahan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139