Gossamer Forum
Home : Products : DBMan : Customization :

Search link returns multiple entries

Quote Reply
Search link returns multiple entries
Hi

Couple of questions

1) I want to create a link by record ID to a specific record in the database using the syntax
db.pl?uid=default&view_records=1&ID=12
However, it performs a keyword search, return all records with the number 12 rather than record 12. Any suggestions?

Second question
Would like to replace the submit button with an image. I've use the following
<input type=image border=0 SRC="image/go.gif" ALT="GO">
but the srcipts returns an Unknown Action error when you then click on the image. This also happens when you type in your search term and press the <return> key rather than click on the submit button. Any suggestions.

Last one. When the script returns a mesage
Use of uninitialized value at /inetpub/cgi-bin/tdd/html.pl line 28, do you count all lines in the script, including #comments lines or is it simply active lines.
This is returned from an NT server, the script works fine but I get this error so I think it is in the HTML coding.

Hope this all makes sense.

Thanks

Ramsay
Quote Reply
Re: Search link returns multiple entries In reply to
1) Include "ww=1" in your link:

db.pl?uid=default&view_records=1&ID=12&ww=1

That makes it search for "whole words."

2) You need to give a name to the button (I think. I've never done this, but I think this will work)

<input type=image border=0 SRC="image/go.gif" ALT="GO" name="view_records" value="1">

You'll need to go through each of the subroutines in html.pl that includes a submit button and add the appropriate "name" tag. The value should be "1" on all of them. (Could really be anything so long as it's not 0 or empty.)

Please let me know if this works! Smile

3) Count all the lines when you're looking for an error, including the comment lines.

A couple of suggestions -- if you don't have one already, get a text editor that is specifically designed for programming. I like Programmer's File Editor, which is available at download.com -- for free! Smile You can set it up to print out the line numbers down the side of the screen and you can have it go to a specific line. I know there are other editors that do pretty much the same thing, so other folks may have other suggestions about which one they prefer.

Suggestion #2 -- be sure, whatever file editor you use, that you don't have word wrap on. Some of the lines in these scripts are really long and if you have word wrap on you'll never find the right line.

Suggestion #3 -- the error is almost never at the line that is returned in the debug information. What you can be sure of, though, is that the line is either on the line that was given or somewhere before it.


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