?
Solved

Recordset filtering

Posted on 2003-11-03
4
Medium Priority
?
320 Views
Last Modified: 2010-04-25
Hey there again,

I was wondering, i have a asp page setup to filter the recordset acording to the URL parameter and the column in the database called sectCode .. eg. when the url parameter reads ?sectCode=web then it filters all the records with "web" in the db's sectCode field. What i want to be able to do is give the records the ability to be in more than one section. So the sectCode filed in the database will read "web, print" and when filtering for web, it will find the records, and when filtering for print it will find the record. Is there a way i can do this?  

Nugs
0
Comment
Question by:Nugs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:gabss
ID: 9677197
If you go into the source code and change the SQL by using the AND or OR commands this could help...


If you have the source i'll have a look.....


I dont think DW set dialog boxes can cope with this " complex instructions " ummmm complex my A***** lol

Simple stuff yeh.....

G
0
 
LVL 2

Author Comment

by:Nugs
ID: 9681691
Yes i thought there would be a little SQL to do the trick, not sur how to implement that so if you could i would appreciate any help.

Here is the current recordset code for the page:

<%
Dim SectionSlides__MMColParam
SectionSlides__MMColParam = "1"
If (Request.QueryString("SectCode") <> "") Then
  SectionSlides__MMColParam = Request.QueryString("SectCode")
End If
%>
<%
Dim SectionSlides
Dim SectionSlides_numRows

Set SectionSlides = Server.CreateObject("ADODB.Recordset")
SectionSlides.ActiveConnection = MM_portfolioConn_STRING
SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMColParam, "'", "''") + "'"
SectionSlides.CursorType = 0
SectionSlides.CursorLocation = 2
SectionSlides.LockType = 1
SectionSlides.Open()

SectionSlides_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
SectionSlides_numRows = SectionSlides_numRows + Repeat1__numRows
%>

Would i change the following line?

SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMColParam, "'", "''") + "'"

Thanks for the help!
Nugs
0
 
LVL 1

Accepted Solution

by:
gabss earned 50 total points
ID: 9685821
im using php mysql and had a similar problem....

The solution i found was

SELECT * FROM directory WHERE MATCH (keywords,title) AGAINST ('%%%s%%')

this only works on full text and iif using to fields then daul indexing....

http://www.mysql.com/doc/en/Fulltext_Search.html


Hope this helps ?



0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question