OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

RE: search across multiple fields

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> RE: search across multiple fields
Page: <<   < prev  1 2 [3] 4 5   next >   >>
 
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 13:26:21   
It is the same site...just the live search page...i was using the other one while we tested. We can use that same one again as it is just about identical. Go to http://www.axiomskatesales.com/searchtest.asp and type 'deck' in the search. Then scroll down and click next...it loads the page with an error above the table and no results...it is the same error you get when you first go to the page and you haven't typed in any search words....for some reason when you click 'next', 'end', etc....it isn't passing any search word. Here is the entire code for searchtest.asp

Thanks,
John

quote:


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>itemname</title>
</head>

<body>

<p><form method="POST" action="searchtest.asp">
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="302" id="AutoNumber3">
<tr>
<td width="148"><img border="0" src="images/searchbykeyword.jpg" width="148" height="29"></td>
<td width="147"> <input type="text" name="search" size="6" style="width:90px" onfocus="doClear(this);" value="Keyword"> 
<input type="submit" value="Go!" name="B2"></td>
</tr>
</table>
</form>
<p> </p>

<div align="left">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="532" id="AutoNumber2">
<tr>
<td width="340"><font size="1" face="Arial" color="#000080">Click
either the pic or the link for a larger image</font><font face="Arial" color="#800000"><b><br>
<font size="2">Showing All Search Results
for
<!--webbot bot="HTMLMarkup" startspan -->"<%=Request("search")%>"<!--webbot bot="HTMLMarkup" endspan --></font></b></font></td>
<td width="188"><SCRIPT LANGUAGE="JavaScript">
<!--

function printPage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}

// -->
</SCRIPT>
<a href="javascript:printPage()"><img border="0" src="images/printpage.jpg"></a></td>
</tr>
<tr>
<td width="340"> </td>
<td width="188"> </td>
</tr>
</table>
</div>
<table width="500" border="1" bordercolor="#00004F" cellspacing="0" cellpadding="3">
<thead>
<tr>
<td background="tablebkgrd.gif" width="85">
<p align="center"><b><font size="2" color="#800000">Item Pic</font></b></p>
</td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=brands&search=<%=Request("search")%>">Brand</a></b></font></td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=itemname&search=<%=Request("search")%>">Item
Name</a></b></font></p>
</td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=category&search=<%=Request("search")%>">Category</a></b></font></td>
<td background="tablebkgrd.gif" width="70">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=price&search=<%=Request("search")%>">Price</a></b></font></td>
<td background="tablebkgrd.gif" width="64">
<p align="center"><font size="2" color="#800000"><b>Cart</b></font></td>
</tr>
</thead>
<tbody>
<%
Dim Keyw, keyt
Dim sort
Dim myquery
Dim myQuerystring
Keyt = " SELECT * FROM products WHERE "
Keyw = split(Request.Form("search" )," " )
myQuerystring = "((Itemname Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(0))&"%'))"
if uBound(Keyw) > 0 Then
for i = 1 to uBound(Keyw)
myQuerystring = myQuerystring & " AND"
myQuerystring = myQuerystring & " ((Itemname Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(i))&"%'))"
next
end if
Keyw = Keyt + myQuerystring
Keyw = Keyw + " ORDER BY ::SortColumn:: "
myquery = Keyw
response.write myquery
%>
<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry=myquery
fp_sDefault="search=&search=&search=&search=&SortColumn=brands"
fp_sNoRecords="<tr><td colspan=12 align=left width=""100%"">No products matched your search criteria...</td></tr>"
fp_sDataConn="louisvilleguide"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=20
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="itemname"
fp_sMenuValue="itemname"
fp_iDisplayCols=12
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<tr>
<td bgcolor="#FFFFE6" width="85">
<p align="center"><a href="productdetail.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>"><img border="0" src="pics/<%=FP_FieldLink(fp_rs,"picture")%>" height="72"></a></p>
</td>
<td bgcolor="#FFFFE6">
<p align="center"><font size="2" color="#00004F">


<%=FP_FieldVal(fp_rs,"brands")%>
</font>


</td>
<td bgcolor="#FFFFE6">
<p align="center"><a href="productdetail.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>">
<%=FP_FieldVal(fp_rs,"itemname")%></a>
<%If FP_FieldVal(fp_rs,"activated") = "no" then%>
<img border="0" src="images/outofstock.jpg"><%Else%>
<%End If%>
<%If FP_FieldVal(fp_rs,"activated") = "preorder" then%>

<img border="0" src="images/preorder.jpg"><%Else%>
<%End If%>
</p>

</td>
<td bgcolor="#FFFFE6">
<p align="center"><font size="2" color="#00004F">
<%=FP_FieldVal(fp_rs,"category")%></font></td>
<td bgcolor="#FFFFE6" width="70">
<p align="center"><font size="2" color="#00004F"><%=FormatCurrency(FP_FieldVal(fp_rs,"price"))%></font></td>
<td bgcolor="#FFFFE6" width="64">
<p align="center"><a href="http://ww6.aitsafe.com/cf/add.cfm?product=Item+Number+<%=FP_FieldURL(fp_rs,"itemnumber")%>+--+<%=FP_FieldURL(fp_rs,"brands")%>+--+<%=FP_FieldURL(fp_rs,"itemname")%>&price=<%=FP_FieldURL(fp_rs,"price")%>&qty=1&userid=83100920&units=<%=FP_FieldURL(fp_rs,"weight")%>"><img border="0" src="images/addtocart.jpg"></a></td>
</tr>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>
<p align="center"> </p>

<p align="left"><font face="Arial" size="2"><strong>If you didn't find what
you're looking for, </strong><strong><a href="contact.asp">send us a message</a>
and we will try our best to help. </strong></font></p>

<p align="center"> </p>

<p align="center"></p>

<blockquote>
<form action="http://visitlouisville.com/couponsbyname.asp" method="post">
</form>
</blockquote>

</body>

</html>

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 15:26:26   
First off, you really shouldn't have a search page that keeps going back to itself. I don't use that method. Anyway, the reason for this error is that each time you press [NEXT] the SEARCH variable is cleared. You can see the "keyword" back in your search box at the top.

In your page you will find a line near the top like this:

<input type="text" name="search" size="6" style="width:90px" onfocus="doClear(this);" value="Keyword">

change it to this:

<input type="text" name="search" size="6" style="width:90px" value=<%=request("search")%>>

Now it will hold the value that the user typed in. But using your same-page-search-method, it will probably generate another problem. Test it and see what happens.

Using the same page is NOT A GODD IDEA.
Ask for user input on one page.
Search / Display on another. :)

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 15:32:21   
This will also explain why you get an error that states:


Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 0]'

/searchtest.asp, line 77



...when you first get to the page and haven't even performed a search yet. I notice the second the page is loaded, before I even type anything, the error is there.

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 16:00:18   
To combat the error popping up on the page when you first visit it, try this code:

<%
Dim Keyw, keyt
Dim sort
Dim myquery
Dim myQuerystring
if (Request.Form("search" ) <> "" AND Request.Form("search" ) <> " ") Then
Keyt = " SELECT * FROM products WHERE "
Keyw = split(Request.Form("search")," " )
myQuerystring = "((Itemname Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(0))&"%'))"
if uBound(Keyw) > 0 Then
for i = 1 to uBound(Keyw)
myQuerystring = myQuerystring & " AND"
myQuerystring = myQuerystring & " ((Itemname Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(i))&"%'))"
next
end if
Keyw = Keyt + myQuerystring
Keyw = Keyw + " ORDER BY ::SortColumn:: "
myquery = Keyw
response.write myquery
%>



And ALL THE WAY down at the bottom of the page you will see

</blockquote>

</body>

</html>


Put the closing "End If" line here like this:


</blockquote>
<%end if %>
</body>

</html>


_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 16:02:28   
Let me know how it goes...

_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 16:49:37   
I have that error fixed with your method......on my actual live search i do have them on separate pages...like at www.axiomskatesales.com . The search is at the top and it loads in the main frame. The error is the same....i am just using http://axiomskatesales.com/searchtest.asp as a test page, so i don't mess with the actual site.

It still seems it isn't passing the value even though i changed the search. The 'next' buttons aren't passing anything back to the page. I set up for it to reveal 20 records per page before i dieted the code...the pagination worked before we altered the search, but now gives that error when clicking the buttons. If there's a better way that will work i'm game.

Thanks,
John

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:02:15   
quote:

I have that error fixed with your method......
Very good.

quote:

on my actual live search i do have them on separate pages...like at www.axiomskatesales.com .
Very good.

So it's bascially getting the variable to tranfer from search page to search page?
I'm checking it now.

I have the exact same scenario on my site. I just tested it with a multiple page search and it works fine.

It has something to do with the diet and your includes. Did you check your includes? They are in this directory in your tree: _includes

< Message edited by Long Island Lune -- 9/30/2003 5:03:39 PM >


_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:06:47   
Remember that site I sent you too? I just checked it there too and a multipage search works fine.

Look in your includes directory and let me know what files you have in it.

_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:06:52   
I guess i wouldn't really know what to check...i'm not sure how that part works..i just usually set it in the DRW and it works fine. Do you need me to post the code or is what you've seen enough?

Thanks,
John

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:08:22   
Depends on what files you find in that directory.

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:12:01   
Actually If I were you I would do this:

1): Wipe out everything and do the entire search page over again in a new DRW.
2): Diet the DRW.
3): Place my code segment in again - right above the DRW.

This would probably solve the problem immediately.
Are you able to do this? To advice all this is outside my help capacity.
But that would be the quickest way to solve the problem.

If you can't let me know what files you have in your _include dir.

< Message edited by Long Island Lune -- 9/30/2003 5:12:50 PM >


_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:21:31   
I don't see an includes folder. I have hidden dirs showing and i see _fpclass adn _private...but no _includes folder. I actually did rebuild it from scratch to see if i could get it to work...same problem.

http://axiomskatesales.com/searchbackup.asp

That is the original search i had before we edited it at all....the navigation is fine there...i saved that page as a new page and redieted and reinserted your code...then the nav doesn't work. Any ideas?

John

(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:25:37   
Update...i just took your code out and just put a generic query in the line where we had "myquery"...with the code still on the diet, and the navigation works. not sure what that means.

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:30:35   
Hmmm. There's something different in your code than in mine. Why mine works and your doesn't is the million dollar question.

_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:34:41   
Here is the page of code for searchtest.asp as is:

quote:


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>itemname</title>
</head>

<body>

<p><form method="POST" action="searchtest.asp">
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="302" id="AutoNumber3">
<tr>
<td width="148"><img border="0" src="images/searchbykeyword.jpg" width="148" height="29"></td>
<td width="147"> <input type="text" name="search" size="6" style="width:90px" value="<%=request("search")%>"> 
<input type="submit" value="Go!" name="B2"></td>
</tr>
</table>
</form>
<p> </p>

<div align="left">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="532" id="AutoNumber2">
<tr>
<td width="340"><font size="1" face="Arial" color="#000080">Click
either the pic or the link for a larger image</font><font face="Arial" color="#800000"><b><br>
<font size="2">Showing All Search Results
for
<!--webbot bot="HTMLMarkup" startspan -->"<%=Request("search")%>"<!--webbot bot="HTMLMarkup" endspan --></font></b></font></td>
<td width="188"><SCRIPT LANGUAGE="JavaScript">
<!--

function printPage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}

// -->
</SCRIPT>
<a href="javascript:printPage()"><img border="0" src="images/printpage.jpg"></a></td>
</tr>
<tr>
<td width="340"> </td>
<td width="188"> </td>
</tr>
</table>
</div>
<table width="500" border="1" bordercolor="#00004F" cellspacing="0" cellpadding="3">
<thead>
<tr>
<td background="tablebkgrd.gif" width="85">
<p align="center"><b><font size="2" color="#800000">Item Pic</font></b></p>
</td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=brands&search=<%=Request("search")%>">Brand</a></b></font></td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=itemname&search=<%=Request("search")%>">Item
Name</a></b></font></p>
</td>
<td background="tablebkgrd.gif">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=category&search=<%=Request("search")%>">Category</a></b></font></td>
<td background="tablebkgrd.gif" width="70">
<p align="center"><font size="2" color="#800000"><b><a title="Click to Sort" href="search.asp?SortColumn=price&search=<%=Request("search")%>">Price</a></b></font></td>
<td background="tablebkgrd.gif" width="64">
<p align="center"><font size="2" color="#800000"><b>Cart</b></font></td>
</tr>
</thead>
<tbody>

<%
Dim Keyw, keyt
Dim sort
Dim myquery
Dim myQuerystring
if (Request.Form("search" ) <> "" AND Request.Form("search" ) <> " ") Then
Keyt = " SELECT * FROM products WHERE "
Keyw = split(Request.Form("search")," " )
myQuerystring = "((Itemname Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(0))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(0))&"%'))"
if uBound(Keyw) > 0 Then
for i = 1 to uBound(Keyw)
myQuerystring = myQuerystring & " AND"
myQuerystring = myQuerystring & " ((Itemname Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (brands Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (category Like '%"&trim(Keyw(i))&"%')"
myQuerystring = myQuerystring & " OR (subcategory Like '%"&trim(Keyw(i))&"%'))"
next
end if
Keyw = Keyt + myQuerystring
Keyw = Keyw + " ORDER BY ::SortColumn:: "
myquery = Keyw
response.write myquery
%>
<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry=myquery
fp_sDefault="search=&search=&search=&search=&SortColumn=brands"
fp_sNoRecords="<tr><td colspan=12 align=left width=""100%"">No products matched your search criteria...</td></tr>"
fp_sDataConn="louisvilleguide"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=20
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="itemname"
fp_sMenuValue="itemname"
fp_iDisplayCols=12
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<tr>
<td bgcolor="#FFFFE6" width="85">
<p align="center"><a href="productdetail.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>"><img border="0" src="pics/<%=FP_FieldLink(fp_rs,"picture")%>" height="72"></a></p>
</td>
<td bgcolor="#FFFFE6">
<p align="center"><font size="2" color="#00004F">


<%=FP_FieldVal(fp_rs,"brands")%>
</font>


</td>
<td bgcolor="#FFFFE6">
<p align="center"><a href="productdetail.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>">
<%=FP_FieldVal(fp_rs,"itemname")%></a>
<%If FP_FieldVal(fp_rs,"activated") = "no" then%>
<img border="0" src="images/outofstock.jpg"><%Else%>
<%End If%>
<%If FP_FieldVal(fp_rs,"activated") = "preorder" then%>

<img border="0" src="images/preorder.jpg"><%Else%>
<%End If%>
</p>

</td>
<td bgcolor="#FFFFE6">
<p align="center"><font size="2" color="#00004F">
<%=FP_FieldVal(fp_rs,"category")%></font></td>
<td bgcolor="#FFFFE6" width="70">
<p align="center"><font size="2" color="#00004F"><%=FormatCurrency(FP_FieldVal(fp_rs,"price"))%></font></td>
<td bgcolor="#FFFFE6" width="64">
<p align="center"><a href="http://ww6.aitsafe.com/cf/add.cfm?product=Item+Number+<%=FP_FieldURL(fp_rs,"itemnumber")%>+--+<%=FP_FieldURL(fp_rs,"brands")%>+--+<%=FP_FieldURL(fp_rs,"itemname")%>&price=<%=FP_FieldURL(fp_rs,"price")%>&qty=1&userid=83100920&units=<%=FP_FieldURL(fp_rs,"weight")%>"><img border="0" src="images/addtocart.jpg"></a></td>
</tr>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>
<p align="center"> </p>

<p align="left"><font face="Arial" size="2"><strong>If you didn't find what
you're looking for, </strong><strong><a href="contact.asp">send us a message</a>
and we will try our best to help. </strong></font></p>

<p align="center"> </p>

<p align="center"></p>

<blockquote>
<form action="http://visitlouisville.com/couponsbyname.asp" method="post">
</form>
</blockquote>
<%end if %>
</body>

</html>

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:38:55   
Just below my code, in the dieted DRW code you will see a line like this;

fp_sDefault="search=&search=&search=&search=&SortColumn=brands"


Change it to reflect the fields that are being searched:

fp_sDefault="itemnames=&brand=&category=&subcategory=&search="

I'm looking for differences between my code and yours.

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:41:09   
quote:

louisvilleguide


What is louisvilleguide? Your database name?

_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:45:37   
I did that...no change.

Yes, louisvilleguide is the name of my db

(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 17:50:03   
It seems like maybe, since when i had an actual query where 'myquery' is and the page nav worked...and it wont when i have 'myquery' there...that FP uses that line to know what it is querying for the next page, and for some reason it cant read it.

I tried moving the code you gave me down below the first 'include' tag but no change???

(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 18:19:58   
Another clue....notice below...

Here is the form for "next, prev, back, etc"...on a page where it is working...my original search page

quote:


<FORM NAME="fpdbr_0" ACTION="/searchbackup.asp" TARGET="_self" METHOD=POST><NOBR><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" Next "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" End "> [1/14]</NOBR><INPUT TYPE=HIDDEN NAME="search" VALUE="deck"><INPUT TYPE=HIDDEN NAME="SortColumn" VALUE="brands"></FORM>



Here is it from the page with your code

quote:


<FORM NAME="fpdbr_0" ACTION="/searchtest.asp" TARGET="_self" METHOD=POST><NOBR><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" Next "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" End "> [1/14]</NOBR><INPUT TYPE=HIDDEN NAME="SortColumn" VALUE="brands"></FORM>


This one doesn't include the hidden field "search"...so it isn't passing that value so it doens't come up with anything...unfortunately i have no idea how to fix this...

Thanks,
John

(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 20:17:28   
Well, i've been messing with this about 2 hours and i can't figure it out. Can you see any other differences between our code and why yours will paginate and mine wont? Just when i thought we had it, this comes up...

Thanks,
John

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:16:37   
Well, it seems that the value of Sortcolumn is being passed, but SEARCH is not being passed just like you noticed. That is the problem. I see:

<INPUT TYPE=HIDDEN NAME="SortColumn" VALUE="brands">

Try adding another hidden field for "SEARCH" like this:

<INPUT TYPE=HIDDEN NAME="search" VALUE=<%=request("search")%>>

Even though you HAVE it on the page already that part is missing in that bot code for some reason and it's not being passed. Try that.

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:18:26   
<FORM NAME="fpdbr_0" ACTION="/searchtest.asp" TARGET="_self" METHOD=POST><NOBR><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" Next "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" End "> [1/14]</NOBR><INPUT TYPE=HIDDEN NAME="SortColumn" VALUE="brands">
<INPUT TYPE=HIDDEN NAME="search" VALUE=<%=request("search")%>>
</FORM>


_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:26:04   
How can i add it in though...the form is automatically generated by frontpage depending on how many records there are....is there a way to do away with their "bot" and put in my own so i have more control. I was trying to figure out a way to do just what you said, but couldn't figure it out...that code is apparently generated by FP and I have other pages the pagination is working fine on i don't want to mess up.

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:31:42   
Actually NO. I forgot about that. Your not in control of webbot code, FP is.

searchtest.asp is your test page right? Did you DIET that page?

Well, tell me which pages did you DIET?

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:34:17   
quote:

http://axiomskatesales.com/searchbackup.asp


I'm playing with this page. Does it have the old SQL?

_____________________________


(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:36:25   
Yes it is dieted...to get your code in there i had to. But i had it set to 20 record split before the diet and it stayed the same. As i said, if i take out 'myquery' and replace it with a regular SQL query, the pagination works...but as soon as i add your code and change that first fp line to 'myquery' so the search works, the pagination is lost. Perplexing???

I was wondering if i could start over with the search and take out the 20 record split in the drw and then find a way to do the split myself. But i don't know how to start on that....is your code any diff than mine? Why does your pagination work?

(in reply to jonance)
jonance

 

Posts: 302
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:38:07   
http://axiomskatesales.com/searchbackup.asp is the original code before we did ANYTHING. With the poorly performing search but working pagination.

http://axiomskatesales.com/searchtest.asp is what we currently have...with the good search and pagination

(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 22:43:11   
Good question. I'm looking it over right now. What a crazy problem...

_____________________________


(in reply to jonance)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: search across multiple fields - 9/30/2003 23:00:25   
I'm looking my site over. As you saw.... this is what I have:

Page 1:
As you saw, this allows you to pick the search type (1 of 15), and the type of product you want to search for. The variable is named PRODUCT TYPE. When you press SUBMIT, the value of PRODUCT TYPE is passed to page 2.

Page 2:
Contains a form. The form contains a search field KEYWORD that the user can type their words into. It also contains a hidden field that holds the PRODUCT TYPE value from page 1 so it can be passed to page 3. So when you press SUBMIT, the words from the search field KEYWORD and hidden field PRODUCT TYPE values are passed to page 3.

Page 3:
This page contains a dieted DRW with the code we have been working on ABOVE the dieted DRW. The search is performed, the correct products appear and pagnation works fine.

Where did you find this code:


<FORM NAME="fpdbr_0" ACTION="/searchtest.asp" TARGET="_self" METHOD=POST><NOBR><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" Next "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" End "> [1/14]</NOBR><INPUT TYPE=HIDDEN NAME="SortColumn" VALUE="brands"></FORM>
I don't see it in your list post...


You using test pages and real pages... I'm getting confused now.

_____________________________


(in reply to jonance)
Page:   <<   < prev  1 2 [3] 4 5   next >   >>

All Forums >> Web Development >> ASP, PHP, and Database >> RE: search across multiple fields
Page: <<   < prev  1 2 [3] 4 5   next >   >>
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts