database record set. and listing.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: database record set. and listing.

  1. #1
    John Blunt Guest

    database record set. and listing.


    Hello all.
    I hope there is some one here that can help me. I have had a site built.
    www.allclubs.com.au the site is almost complete. But the site host's have
    asked me to back of the listing so it only produces 20 list at a time. I
    have been every were looking for help I am only vagly familiar with ASP and
    vb script.( But I am learning fast this happens when you programmer takes
    the money and runs.) I am so desperate that I am willing to pay others to
    finish it. If there is some one there who can finish this script by adding
    a record set of 20 records at a time. I will forward $50.00 to them for there
    trouble. I do realise this is not much but it is all I got. I have included
    the script I am using now, this does work fine.
    I did do the 10 miniuite record set and got no joy I don't know what i did
    wrong. I only had to cut and paste and edit.?
    Thank you in advance for any help recieved.
    This script is called searchresults.asp.



    <html>
    <head>
    <title>allclubs.com.au</title>
    <style>
    td {font-family: arial;}
    </style>
    </head>
    <body>

    <!--#include file="header.asp"-->

    <%
    dim ss
    dim con
    dim rs

    set con = createobject("adodb.connection")
    con.open "DBQ=" & Server.Mappath("db/allclubs.mdb") & ";Driver={Microsoft
    Access Driver (*.mdb)};"

    ss = "select * from clubs where id in (select max(id) from
    clubs where state like '" & request.querystring("state") & "%' and category
    like '" & request.querystring("type") & "%' and name like '%" & request.querystring("name")
    & "%' and mid(phone,5,1) <> ')' and mid(phone,6,1) <> ')' group by phone)
    order by name"

    ' ss = "select * from clubs where state like '" & request.querystring("state")
    & "%' and category like '" & request.querystring("type") & "%' and name like
    '%" & request.querystring("name") & "%' order by name"

    set rs = con.execute(ss)
    %>
    <table border="0">
    <%
    do while not rs.eof
    %>
    <tr>
    <td>
    <a href="clubhomepage.asp?clubid=<% = rs.fields("id") %>"><%= rs.fields("name")
    %></a>
    </td>
    </tr>
    <tr>
    <td>
    <font size="2pt">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= rs.fields("address")
    & "&nbsp;" & rs.fields("city") & "&nbsp;" & rs.fields("state") & "&nbsp;"
    & rs.fields("postcode") %>
    </font>
    </td>
    </tr>

    <%
    rs.movenext
    loop
    %>
    </table>
    <%
    rs.close
    con.close

    set rs = nothing
    set con = nothing
    %>

    <!--#include file="footer.asp"-->

    </body>
    </html>


  2. #2
    Don Wolthuis Guest

    Re: database record set. and listing.


    Sent you something at: johney@globalfreeway.com.au
    Take Care -


    "John Blunt" <johney@globalfreeway.com.au> wrote:
    >
    >Hello all.
    >I hope there is some one here that can help me. I have had a site built.
    >www.allclubs.com.au the site is almost complete. But the site host's have
    >asked me to back of the listing so it only produces 20 list at a time. I
    >have been every were looking for help I am only vagly familiar with ASP

    and
    >vb script.( But I am learning fast this happens when you programmer takes
    >the money and runs.) I am so desperate that I am willing to pay others to
    >finish it. If there is some one there who can finish this script by adding
    >a record set of 20 records at a time. I will forward $50.00 to them for

    there
    >trouble. I do realise this is not much but it is all I got. I have included
    >the script I am using now, this does work fine.
    >I did do the 10 miniuite record set and got no joy I don't know what i did
    >wrong. I only had to cut and paste and edit.?
    >Thank you in advance for any help recieved.
    >This script is called searchresults.asp.
    >
    >
    >
    ><html>
    > <head>
    > <title>allclubs.com.au</title>
    > <style>
    > td {font-family: arial;}
    > </style>
    > </head>
    > <body>
    >
    > <!--#include file="header.asp"-->
    >
    ><%
    > dim ss
    > dim con
    > dim rs
    >
    > set con = createobject("adodb.connection")
    > con.open "DBQ=" & Server.Mappath("db/allclubs.mdb") & ";Driver={Microsoft
    >Access Driver (*.mdb)};"
    >
    > ss = "select * from clubs where id in (select max(id) from
    >clubs where state like '" & request.querystring("state") & "%' and category
    >like '" & request.querystring("type") & "%' and name like '%" & request.querystring("name")
    >& "%' and mid(phone,5,1) <> ')' and mid(phone,6,1) <> ')' group by phone)
    >order by name"
    >
    >' ss = "select * from clubs where state like '" & request.querystring("state")
    >& "%' and category like '" & request.querystring("type") & "%' and name

    like
    >'%" & request.querystring("name") & "%' order by name"
    >
    > set rs = con.execute(ss)
    >%>
    > <table border="0">
    ><%
    > do while not rs.eof
    >%>
    > <tr>
    > <td>
    > <a href="clubhomepage.asp?clubid=<% = rs.fields("id") %>"><%= rs.fields("name")
    >%></a>
    > </td>
    > </tr>
    > <tr>
    > <td>
    > <font size="2pt">
    > **********<%= rs.fields("address")
    >& "&nbsp;" & rs.fields("city") & "&nbsp;" & rs.fields("state") & "&nbsp;"
    >& rs.fields("postcode") %>
    > </font>
    > </td>
    > </tr>
    >
    ><%
    > rs.movenext
    > loop
    >%>
    > </table>
    ><%
    > rs.close
    > con.close
    >
    > set rs = nothing
    > set con = nothing
    >%>
    >
    > <!--#include file="footer.asp"-->
    >
    > </body>
    ></html>
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center