Gossamer Forum
Home : Products : DBMan : Installation :

mh=3 only delivers the first 3 results

Quote Reply
mh=3 only delivers the first 3 results
I use the dbman script and want people to search my database without login. So set the correct parameter so that I can access the search directly from my site (people only have to enter a search word in a text box field).

I use HTML editor Netobjects Fusion to post to the script. I have a title search field for the people. That's the only thing they have to fill in. The rest are hidden fields: name/value: mh/3, view_records/1, uid/default. I post to the script http://www.mydomain.com/cgi/dbman.db.cgi.

Everything works fine. I see the results only I do NOT see the hidden fields in my browser line, next to the http. Except that when I activate the option mh=3 I only see the first 3 results. When I click on "next page link" the scripts appends "nh=2" at the end of the line. Which will show then:
http://www.mydomain.com/cgi/dbman.db.cgi&nh=2

Because the browser line (next to the http://) is NOT showing the parameters the first place, but is showing the correct results, the error appears when the script adds the nh=2 (bext page parameter).

Any clues on how to fix it. Sure I can skip the "mh=3" parameter, then it works fin, but I like the mh-thing.

Thanks,

HANS
Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
I would suggest increasing your mh (maximum hits returned) to a larger number.

Setting this to 3 is telling the script to only return 3 hits Smile

I believe that if you don't use the mh setting within your search box it will automatically return the number of hits based on this line in your .cfg file:

$db_max_hits = 40;

Hope this helps Smile
Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
Setting the mh=40 will prevent the error from happening if number of matches <= 40. But it will not solve the problem. Better is skipping the "mh=..." in this case.

Since I want the script to display the results in a nice little frame, I like the mh=3 function.

So please look into this again anyone.

Thanks in advance.
Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
I still don't quite understand what the problem is. Could you tell us where your database is so we can see what's happening?


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





Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
Yes I can give you an URL to see it.
http://www.clickaway.nl/test/test2.htm

The default value "fiets" will return 8 results (displayed in groups of 3 created with the mh=3 command). OK the first 3 results will display as you will notice, but the NEXT page will lead you to the login screen, because the "nh=2" command (which is responsible for showing page 2) is added to an incomplete line in your browser URL field (as you can see).

By the way, I noticed when I left the mh=3 out, that the resultpage did automaticaly show 10 hits on each page. Does that make sence to you?

Thanks,

HANS
Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
I found the problem! Smile

Your form has

METHOD=POST

You need to have

METHOD=GET

All searches must use the GET method in order to have the query string passed on to the subsequent pages.


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





Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
Thanx a million! That's it.

I happen to notice that if I do not includ an mh=3 (or mh=whatever) that the script automatically returns with a 10 items per page. Is that correct?

HANS
Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
It's whatever you set in your .cfg file in the line

$db_max_hits = 10;

You can set that to equal however many records you want to display on a page as a default.


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





Quote Reply
Re: mh=3 only delivers the first 3 results In reply to
Thanks again for helping!