Gossamer Forum
Home : Products : DBMan : Customization :

Mysterious output, slow searching now ?

Quote Reply
Mysterious output, slow searching now ?
A few separate, but equal questions please?

1. It seems that from yesterday to today my search has slowed significatnly. I don't have a preponderance of graphics in my html.pl and only 100+ records in my database. Any idease why it might slow down?

2. When I search and get an output of two or more pages, sometimes my search results line right up to the top of my table, other times, there appears to be about a 200 pixel space before the search begin?

3. I'm using

<img src="lunchico.gif" align="center"></p><p><font
face="verdana,arial" size=1><br>
<A HREF="javascript penNew('beenthere.html')">
About
Been There, Ate
That</a>

To create a pop-up window, when there is a restaurant review or comment. If there is NONE, is there any way I can "code" the field for that record, so no window pops up?

Try searching Carroll Gardens and Italian at:

www.tasteofbrooklyn.com/tob/cgi-bin/dbman/main6.html


THANKS for your patience.

------------------
Catalyst for the new millenium

[This message has been edited by CyborgNY (edited October 18, 1999).]
Quote Reply
Re: Mysterious output, slow searching now ? In reply to
1) It could be a couple of things. It could be that something's going on with your server. I would wait a few days and see if it picks up. The other thing I would do is look to see what changes you made to the script between the time it was working correctly and the time it slowed down. If you have a backup of the files before the latest change, install them again and see what happens.

After checking out your site, it seems that the search is fine. It's just the building of the pages that's slow.

2) I did a search that gave me a 4-page result, but I didn't see the problem. Is it something you can duplicate with the same search terms every time?

3) What is the name of the field where NONE would show up?


------------------
JPD





Quote Reply
Re: Mysterious output, slow searching now ? In reply to
How large is your database file? If it is reaching 1 MG or has exceeded 1 MG, then that is the reason why your search is slowing down. Typically, the maximum limit of flat files in terms of searching is 1 MG. If you exceed that, then searches will be dramatically slow.

(However, I tried the search and I got results in less than 5 seconds. It could be your connection to the Net that is slow. Also I got a Search Failed message when I used the search criteria you provided.)

In terms of the javascript codes...I don't fully understand what problems you are having with it.

Regards,



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Mysterious output, slow searching now ? In reply to
Okay, in terms of the search it happens about every other time (on every other page). Sometimes flush at the top other times 2 inches below the top. It might be an IE thing? In which case I'll inspect my HTML more closely.

The javascript situation is that we have reviews for about 50 of our restaurants, but not all 100, when people click on the "Been There, Ate That Field", a window with the review pops up (thanks to Eliot's code !), but I don't want it to bring up a window if there's no review.

I think the speed thing is my server, I'm on a T1, but still slow!

THANKS CREW!

Quote Reply
Re: Mysterious output, slow searching now ? In reply to
What is the name of your field that determines whether you want the Javascript window to pop up?

I didn't see the problem with the extra space when using Netscape. It might be an IE thing. I hate IE, so I don't use it unless I absolutely have to. (I did use IE to check this out, though, and I still didn't see the problem.) I searched for Brooklyn Heights and got 4 pages of results.



------------------
JPD





Quote Reply
Re: Mysterious output, slow searching now ? In reply to
Been there Ate that, is the name of the field.

Thanks.

Quote Reply
Re: Mysterious output, slow searching now ? In reply to
What I see from your site is the following:

Code:
<tr><td align=left valign=top>
<font face=Verdana, Arial, Helvetica size=2 color=#003399>Been there, ate
that!:</font></td>
<td><font face="verdana,arial,helvetica" size="2">
<A HREF="javascript penNew('http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/reviews/norev.html')">
<img
src="http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/lunchico.gif"
height=42 width=42 border=0> </a></font></td></tr>

From what you've said, you only want the image (and the link to the popup) to appear if there's a review.

I'm not sure about when there isn't a review, though. Is the field empty or is the word None in it? I'll give you the code for both.

If the field would be empty, use:

Code:
|;
if ($rec{'Been there Ate that'}) {
print qq|
<tr><td align=left valign=top>
<font face=Verdana, Arial, Helvetica size=2 color=#003399>Been there, ate
that!:</font></td>
<td><font face="verdana,arial,helvetica" size="2">
<A HREF="javascript penNew('http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/reviews/norev.html')">
<img
src="http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/lunchico.gif"
height=42 width=42 border=0> </a></font></td></tr>
|;
}
print qq|

If the word None is in the field when there is no review, use:

Code:
|;
unless ($rec{'Been there Ate that'} eq 'None') {
print qq|
<tr><td align=left valign=top>
<font face=Verdana, Arial, Helvetica size=2 color=#003399>Been there, ate
that!:</font></td>
<td><font face="verdana,arial,helvetica" size="2">
<A HREF="javascript penNew('http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/reviews/norev.html')">
<img
src="http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/lunchico.gif"
height=42 width=42 border=0> </a></font></td></tr>
|;
}
print qq|

------------------
JPD





Quote Reply
Re: Mysterious output, slow searching now ? In reply to
Unfortunately it's not working correctly, although it is doing something:

I tried:

print qq|
<tr><td align= valign=top><$font_color>Links:</font></td>
<td><$font><A HREF="javascript penNew('$rec{'Links'}')">$rec{'Links'$

|;
if ($rec{'Been there ate that'}) {
print qq|

<tr><td align=left valign=top>
<$font_color>Been there, ate
that!:</font></td>

<td><$font><A HREF="javascript penNew('$rec{'Been'}')">
<img
src="http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/lunchico.gif"
height=42 width=42 border=0> </a></font></td></tr>

|;

but maybe I have some coding wrong? What happens is that now NO icons show up whether or not there are reviews. In those boxes that have no reviews yet there is a URL:
www.tasteofbrooklyn.com/norevyet.html

Should I take this out?

Thanks again.


??

[This message has been edited by CyborgNY (edited November 01, 1999).]