navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
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

Search Forums
 

Advanced search
Recent Posts

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

Microsoft MVP

 

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 and Database >> RE: search across multiple fields
Page: <<   < prev  1 2 3 [4] 5   next >   >>
 
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 23:07:39   
I have only been using searchtest.asp to test. It is a test page....i got that code by viewing the source of searchtest.asp in the browser with the keyword "deck"...that is the html for the form at the bottom for pagination. That is how i found out it wasn't passing that value for some reason.

(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:10:52   
quote:

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


I visited both of these pages. Shouldn't they be exactly the same? You can't use a test page that jumps back on itself, and a real page that goes to another page. How can we narrow down a problem? Your test page should be EXACTLY like your real page. If not, we're fighting two different demons.

A jump back to yourself demon.
And a jump to different demon.

Or... I'm completely confused and losing it!!!
I'll have to pick this up tomorrow.
I'm burnt right now.

Think about what I said. Your test page should be exactly like the actual page that you want to offer clients.

_____________________________


(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:13:28   
I just realized I'M LOSING it. Forget last post.

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 23:21:11   
I understand...i feel the same way tonight.

Anyhow, just ignore the searchbackup.asp. I just used that page to make a back up of my old code from the search. That is all it is...the page i had on the site before we began working...i was just showing it to you as an example of the pagination working before altering the code. None of it is being seen by customers right now.

What i have at searchtest.asp is the same "code" that customers are using right now (with the code you and i were working on).....but not the same page they are seeing. In other words, i don't want be testing and fooling with the page they are actually seeing and do something to give it an error (or at least one worse than they get when trying to go to page 2, 3, etc)...so i have searchtest.asp for us to look at and work on. It is exactly the same code, except i have the search box at the top so we can put in new keywords.

I hope you understand now...basically, all we need to worry about is getting the pagination working on searchtest.asp, as that is where we last left off with your code and the search working fine. For some reason, though, the pagination doesn't work after i inserted that code to improve the search.

Thanks,
John

(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 23:24:25   
Again, understandable....this little problem is driving me nuts as well...i tried all sorts of things earlier to no avail...and am back to where i started. Of course, my attempts are just guesswork. It just doesn't make sense to me why when a normal SQL query is put in on the line 'fp_sQry' the pagination works (but of course it doesn't use the code we added above it)...but when i put 'myquery' in the fp_sQry line (so it inserts your code there)...the pagination doesn't work.

WHY WHY WHY?

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 23:25:58   
John,

Before I go... Remember this post from earlier?:

quote:


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.


Lets try a test:

Replace:

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

with this:

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

The bare value. Maybe REQUEST isn't picking it up.... Try that.

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 9/30/2003 23:34:09   
I put that in and it just put the code in the box when you search....actually the request before was working...but i don't think that what comes in the search box has anything to do with the pagination...it wouldn't really matter if that is up there or not. In my actual site that users see now, the box is on a diff page and the error still happens when hitting "next". The problem seems to be that for somereason the "bot" that creates the code for the next, prev, etc. buttons isn't generating correctly.

(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:51:18   
John,

quote:


actually the request before was working...but i don't think that what comes in the search box has anything to do with the pagination...it wouldn't really matter if that is up there or not.



I agree.

Put the original line segment back into your page:

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

We'll pick it up tonmorrow.
Ciao... :)

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 8:45:14   
I got it back in there:

www.axiomskatesales.com/searchtest.asp

Let me know if you have the slightest idea of where to go with this. I was thinking about when it worked and when it didn't. It works when an SQL is put after fp_sQry but now when we use 'myquery' to insert the sql generated by your code. That doens't really make sense to me, BUT is there another way we can implement your code that might make a difference?

Another angle...do you think that it might make a difference if i put a page in to translate your code that says to the user "Please wait....searching..."...and then pass it over to the next page with a redirect? maybe we could pass it in a slightly different way if we do that and it might work??? Just ideas.

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 - 10/1/2003 13:42:06   
I got back in too.

I have to tell ya, I don't know why this is not working.
I'm perplexed.
I hope it can be solved by today sometime.

I need to make an exact mach-up of your page www.axiomskatesales.com/searchtest.asp . It's going to take a little while.

I'm gonig to send you an IM now.

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 14:02:49   
Got it.

Thanks

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 14:04:44   
Great...it's amazing how this little glitch has consumed me. I guess once i get started on a problem i don't quit until it is solved...i've been looking for any hints but it just seems like some sort of quirk right now...i'll wait and see what you find.

Thanks again,
John

(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 14:07:23   
:)

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 15:14:01   
Just something else i thought of....when an sql query is inputted in the fp_sQry line...it is in quotes:

<%
fp_sQry="SELECT * FROM brands ORDER BY brands ASC"
fp_sDefault=""
fp_sNoRecords=""
fp_sDataConn="brands"

Would that make a difference? Does our output put the query in quotes?

(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 15:19:18   
Quotes or variables are fine for the SQL.

What my code creates is a variable.
When you put it in quotes, it's a literal.
It really doesn't matter.

I don't think it's the code I gave you that is the problem. Or it wouldn't work on mine. It is the mechanics of the page. That's why I requested a zip from you of the page. So I could actually work with the mechanics myself and have that golden ability to "test".

Good thought though. :)

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 15:21:08   
P.S.:

I don't think you can actually add a quote to a string when it is being built. Quotes denote the starting and ending of a string.

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 15:26:37   
Ah...i see. I just thought i'd try and throw out any differences i saw. Take your time...i have set up their actual search page (that users see) to just return a max of 75 records and all on one page...this way they don't see that nasty error.

Getting this fixed will be great to show the client, but there is also a personal vendetta with the evil webbots involved now :)

(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 15:32:28   
Not seeing the nasty error for now is a good idea @ 75 per page.

quote:

Getting this fixed will be great to show the client, but there is also a personal vendetta with the evil webbots involved now


I hear that!!!
WEBBOTS asre always the enemy! :)

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 16:13:02   
I created a similar mach-up on my machine with the page you gave me.
I actually could not use the page you sent because it had too much connection to your site, but I did create an exact identical page of my own, connected to my database.

It is on a single page, like yours, it has:

1): The box up top to accept the search data from the user.
2): My asp code segment.
3): The Dieted DRW.

On the first run through it works just like yours.
But on my page, the box loses it search values after page 1 of the results.

I think I'm getting closer. :)

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 16:18:53   
John,

1 correction.

Everything is like I said on my test page. But here is what actually happens:

1): I enter PENS for my database.
2): PENS are found and displayed. There are 7 pages of them
3): The word PENS is still in the box.
4): When I click the [NEXT] button, the search value PENS disappears and no results show.

This IS the same problem your having right?
If so, then I have the same scenario in my computer now, just like yours.

:):):):):)

Now to figure out why.....

< Message edited by Long Island Lune -- 10/1/2003 4:21:00 PM >


_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 16:46:41   
Hey John,

You can test out my test page for yourself and see if it is doing exactly what yours is.

1): In the upper box, type PENS

The search is located and pens are displayed. The woird PENS is still in the BOX. But if you click {NEXT][>] on the bottom of the search area, the word PENS is lost in the box and no search comes up. This is a direct result of SAME PAGE processing.

I sent you an IM.

Verify that this IS the scenario...
Thanks,
Mark

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 16:51:21   
...CORRECTION TO EARLIER POST...

It wasn't the _includes directory I meant you to look in, it was the _fpclass directory. I located what I needed to see. So disregard that request.

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 17:38:14   
NOTE:

If I remove the myquery variable from the DRW line, and replace it with a line like:

"SELECT * FROM products WHERE (Itemname Like '%black%') OR (brands Like '%black%') OR (category Like '%black%') OR (subcategory Like '%black%') OR (Itemname Like '%label %') OR (brands Like '%label%') OR (category Like '%label%') OR (subcategory Like '%label %') OR (Itemname Like '%sweat %') OR (brands Like '%sweat%') OR (category Like '%sweat%') OR (subcategory Like '%sweat %') ORDER BY ::SortColumn::

...the search does not work either. I don't know why it works on yours!!! :)

So far it seems that the problem has something to do when the page refreshes on it's call back to itself. That's when the variable is lost...

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 17:39:40   
It seems that the same exact thing is happening...it is the same exact problem at searchtest.asp.

Any clues? Why does it refuse to pass that value?

(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 17:52:13   
Try putting this in there...the fp_sQry line instead of myquery

quote:


"SELECT * FROM products WHERE (itemname LIKE '%::search::%' OR brands LIKE '%::search::%' OR category LIKE '%::search::%' OR subcategory LIKE '%::search::%')"


This is the search i had before we altered the code...when remove your code and insert that...the pagination works :)

(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 21:53:55   
Yeah, I tried that. The thing that gets me is it works for you. It does not work for me on my page.

But you have to keep in mind that my page does not have any webbot code anywhere. This might be why.

I had a friend over tonight. He looked at this problem too. His answer was not encouraging. I'm still playing with the code. :)

But you have to remember one thing, I am an ASP man. We're messing with bots and HTML now. I know HTML of course, but I do not consider myself a pro. :)

< Message edited by Long Island Lune -- 10/1/2003 10:51:51 PM >


_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 21:56:20   
I'm thinking that we might have to put at least one line of bot code back in so the system recognizes the variable that appears to be missing inside the fpdbrgn2.inc file -in your _fpclass directory.

_____________________________


(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/1/2003 22:51:01   
John,

Does your backup copy contain the original bot code?
If so, can you email it to me?
Thanks

_____________________________


(in reply to jonance)
jonance

 

Posts: 296
From: Louisville KY USA
Status: offline

 
RE: search across multiple fields - 10/1/2003 23:30:09   
I sent the email...let me know if you didn't get it.

p.s. Another option may be to take out the webbot part...which is triggered by the pagecount line....and build our own pagination mechanism. I looked at some ways on some message boards and asp help pages...but i can't figure out how to integrate them with the fp generated code. They all seem to be "from scratch" asp...which i am not too familiar with.

(in reply to jonance)
Long Island Lune

 

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

 
RE: search across multiple fields - 10/2/2003 0:13:36   
Got it.
Thanks.

quote:


p.s. Another option may be to take out the webbot part...which is triggered by the pagecount line....and build our own pagination mechanism. I looked at some ways on some message boards and asp help pages...but i can't figure out how to integrate them with the fp generated code. They all seem to be "from scratch" asp...which i am not too familiar with.


Possibly. Pure ASP is always best if you ask me. But i'm prejudice when it comes to that...

< Message edited by Long Island Lune -- 10/2/2003 12:14:03 AM >


_____________________________


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

All Forums >> Web Development >> ASP 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