Gossamer Forum
Home : Products : DBMan : Installation :

Strange Search Results...

Quote Reply
Strange Search Results...
Just installed search capability in my dbman application and getting strange search results.

**This particular db has been running for sometime with no other issues.

I added the following code in sub html_page_top:

form action="../cgi-bin/db/db.cgi" method="GET" name="">
<input type=hidden name="db" value="store">
<input type=hidden name="uid" value="default">
<input type="hidden" name="view_records" value=1">
<$font_color>Search the Store</font>
<input type="TEXT" name="keyword" size=15 maxlength=255>
<input type="SUBMIT" name="view_records" value="Search">
</form>

The issue is as follows:
The search results does find matches. However, the formatting is not consistent. The first record displayed usually looks okay. Records below are excerpts from the Description field with and without links-- PLUS some fields which normally do NOT display [such as record id and category] DO display. Again, field formatting is erratic.

Ideas? Everything else is / has been fine.
Thanks
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
Wild guess:

Sometimes the "bold search results" setting can cause problems, especially with links. Try turning it off and see what happens (if not already turned off).
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
missing=====><form action="../cgi-bin/db/db.cgi"

or did that not make it when you cut and pasted it into the forum?
_______________________________________________________
Lem Motlow, Proprietor Lynchburg (pop 361), Tenn.
Quote Reply
Re: [Lem Motlow] Strange Search Results... In reply to
Watts
I turned off the bold search result setting [was "on"]... didn't make a difference.

Lem
The "<" wasn't pasted in to the forum.

`````````````````````````````

Looks like the searches that return one record display normally. The multiple record results are the problem.


Again, the db works flawlessly otherwise.
Ideas?
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
Try this, it works for me...

<form action="$db_script_url" method="GET">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="view_records" value="1">
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Search">
</form>

Unimpressed
_______________________________________________________
Lem Motlow, Proprietor Lynchburg (pop 361), Tenn.
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
Quote:
The multiple record results are the problem.

How good is your html? It sounds like you may have a bad tag somewhere that is throwing off the formatting of your page. This will generally happen with table tags.

Or, have you modified the config file? Some people will add a record to the db and then make changes to the cfg file (ie, adding extra fields, etc) which will cause some records to display properly and some not to.
Quote Reply
Re: [Watts] Strange Search Results... In reply to
Watts
Again... this particular db works flawlessly otherwise. The ONLY issue is with search results.

Lem, I am discounting your Form code suggestion because the Search does in fact return the correct results. The Formatting is the problem.

Watts, you're suggesting the HTML... if that was an issue, wouldn't I have a problem elsewhere in the program? Again, records display fine everywhere else.

Am I missing something?

NOTE I have another db [same mods, essentially the same code] that displays search results fine.

Wondering if I might have some "bad" records?
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
Not sure if you are using "auto-generate" or not. If not then a missing HTML tag really could be the problem. When you say they display improperly - how does it do it? Meaning, is the page a complete wreck (ie, parts of it missing, weird formatting), or do fields appear in the wrong spot? (example):

Name: 123 Maple Street
Address: Houston

If it is formatting, then most likely a bad tag. If fields print info in wrong spot, then data in the db is most likely out of sequential order (bad records).

If you look in the html.pl file you'll see a subroutine that is like second from the top (html_record or so) and underneath it will describe what the sub does. It should say something like: "this is how a record will be displayed when viewed". So it is quite possible that a missing < bracket - especially when using tables could cause the problem to only happen when a search has been performed and more than one record is displayed. The formatting would be okay, when adding/modifying because this format is generated by a different subroutine (the one just above the html_record).

Anyway... I really hope this helps and I'm sorry if I'm totally missing the issue.
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
Just so you could eliminate a potential source of this problem, I would try a new database file and add a few records to see if the problem is there.
_______________________________________________________
Lem Motlow, Proprietor Lynchburg (pop 361), Tenn.
Quote Reply
Re: [Lem Motlow] Strange Search Results... In reply to
Okay.. Looks like we've resolved it.

I created a new db w/ same html.pl ... Works fine with the new data.

Also discovered that the "formatting" problem was an issue during "List All" too.

Thanks all.
Quote Reply
Re: [jmueller] Strange Search Results... In reply to
I'm glad you got it to work... BTW did you get my PM?
_______________________________________________________
Lem Motlow, Proprietor Lynchburg (pop 361), Tenn.
Quote Reply
Re: [Lem Motlow] Strange Search Results... In reply to
tom, yes -- I read the pm. Thanks again.