Gossamer Forum
Home : Products : DBMan : Customization :

Search works then doesn't work.

Quote Reply
Search works then doesn't work.
I hope someone can help me on this one. I have a .pl file that I have set up to search breeders of dogs. I have drop down so you can choose the dog breed and then another one so you can choose the state with the coice to also search all states. This works great.

This is where the problem occurs. I have also set a static html pages for each breed of dog. I than have a choice to search between databases to either search for a breeder or a rescue league. I am using a radio field to make the choice. I than have the option again to choose the state or search all. This was working fine. I have one breed that it works with than another it won't. Some breeds I can search by state but not by all.

I get this error when searching by all.
CGI ERROR
==========================================
Error Message : fatal error: Illegal division by zero at db.cgi line 490.

Script Location : db.cgi
Perl Version : 5.00503
Setup File : breeders.cfg
User ID : default
Session ID : default

Form Variables
-------------------------------------------
Breed : Basset Hound
City/State/Zip :
cs : checked
db : breeders
mh : $db_max_hits
sb : 5
so : descend
uid : default
view_records : Go Get It!

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /home/serve/vettracker
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.vettracker.com
HTTP_REFERER : http://www.vettracker.com/breeds/basset.htm
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
HTTP_VIA : 1.0 NTSERVER
PATH : /bin:/usr/bin
QUERY_STRING : uid=default&Breed=Basset+Hound&db=breeders&City%2FState%2FZip=&mh=%24db_max_hits&cs=checked&sb=5&so=descend&view_records=Go+Get+It%21
REMOTE_ADDR : 206.154.11.142
REMOTE_HOST : 206.154.11.142
REMOTE_PORT : 1150
REQUEST_METHOD : GET
REQUEST_URI : /cgibin/dbman/db.cgi?uid=default&Breed=Basset+Hound&db=breeders&City%2FState%2FZip=&mh=%24db_max_hits&cs=checked&sb=5&so=descend&view_record s=Go+Get+It%21
SCRIPT_FILENAME : /home/serve/vettracker/cgibin/dbman/db.cgi
SCRIPT_NAME : /cgibin/dbman/db.cgi
SERVER_ADMIN : webmaster@mail.serve.com
SERVER_NAME : www.vettracker.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.0
SERVER_SOFTWARE : Apache/1.3.1 (Unix) mod_perl/1.15 PHP/3.0 mod_ssl/2.0.3 SSLeay/0.9.0b

this is the code to perform the search.
<form action="http://www.vettracker.com/cgibin/dbman/db.cgi" method="GET">
<input type=hidden name="uid" value="default">
<input type=hidden name="Breed" value="Beagle">
<input type="radio" name="db" value="breeders" checked><font color="#4e0678" face="comic sans ms" size="2"> Search for a Breeder</font><BR>
<input type="radio" name="db" value="rescues"><font color="#4e0678" face="comic sans ms" size="2"> Search for a Rescue League</font><BR>
<br><select NAME="City/State/Zip">
<option value="">Choose a State
<option value="">Search All
<option> AL
<option> AK
<option> AZ
<option> AR
<option> CA
<option> CO
<option> CT
<option> DE
<option> DC
<option> FL
<option> GA
<option> HI
<option> ID
<option> IL
<option> IN
<option> IA
<option> KS
<option> KY
<option> LA
<option> ME
<option> MD
<option> MA
<option> MI
<option> MN
<option> MS
<option> MO
<option> MT
<option> NE
<option> NV
<option> NH
<option> NJ
<option> NM
<option> NY
<option> NC
<option> ND
<option> OH
<option> OK
<option> OR
<option> PA
<option> RI
<option> SC
<option> SD
<option> TN
<option> TX
<option> UT
<option> VT
<option> VA
<option> WA
<option> WV
<option> WI
<option> WY
</SELECT><br><br>
<INPUT TYPE="hidden" NAME="mh" VALUE="$db_max_hits" SIZE=3 MAXLENGTH=3>
<INPUT TYPE="hidden" NAME="cs" value="checked">
<input type="hidden" name="sb" value="5">
<input type="hidden" NAME="so" value="descend">
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Go Get It!">&nbsp
</form>

If any more info is neede to figure this out let me know.

you can try it yourself at http://www.vettracker.com/temp1.htm

click on Breed info.

Thanks
Subject Author Views Date
Thread Search works then doesn't work. remington 1529 Sep 12, 1999, 9:23 PM
Post Re: Search works then doesn't work.
Eliot 1449 Sep 12, 1999, 9:30 PM
Post Re: Search works then doesn't work.
remington 1449 Sep 12, 1999, 9:37 PM
Post Re: Search works then doesn't work.
Eliot 1450 Sep 12, 1999, 9:41 PM