Gossamer Forum
Home : Products : DBMan : Customization :

Again long/short mod and relational mod

Quote Reply
Again long/short mod and relational mod
Sorry for opening a new threat, but after the notes on the relational DB I have a new situation:

I'm using the long/short mod together with the relational mod and after changing the scripts according to LoisC 's and JpDeni's notes I have the following situation:

User side (single side of the db)

I get is a list of records out of the item db depending on the max hit value and not depending on the UserID field,
that is
records 1-100 for the user 1 (nh=1)
record 101-200 for user 2 (nh=2) ....
when mh (Max Hits) is set to 100 and
records 1-50 for the user 1 (nh=1)
record 51-100 for user 2 (nh=2) ....
when mh (Max Hits) is set to 50.

if I remove the next hit value i get !!!one!!! correct item.

and

I get strange results if I search the database.


regard,

Fischi

PS:

Please take a look into the skripts, you can find them at
http://www.univie.ac.at/psychologie/download/dbman/buch.cfg.txt
http://www.univie.ac.at/psychologie/download/dbman/buch_html.pl.txt
http://www.univie.ac.at/psychologie/download/dbman/db.cgi.txt
http://www.univie.ac.at/psychologie/download/dbman/mitarbeiter.cfg.txt
http://www.univie.ac.at/psychologie/download/dbman/mitarbeiter_html.pl.txt

The page is
http://www.univie.ac.at/psychologie/cgi-bin/dbman/db.cgi?db=mitarbeiter
Username admin password admin
Quote Reply
Re: Again long/short mod and relational mod In reply to
I think your problem is in something you added to db.cgi:

Code:
# Replace for Exact Search
# ($in{'ww'}) and ($tmpreg = "\\b$tmpreg\\b");
($in{'ww'}) and ($tmpreg = "^$tmpreg\$");

I noticed that the "whole word" function didn't work when I did a search. My suggestion would be that you change it back to

Code:
($in{'ww'}) and ($tmpreg = "\\b$tmpreg\\b");

See if that works better for you.


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





Quote Reply
Re: Again long/short mod and relational mod In reply to
Changed it back, but didn't help. I get still the same results.

Fischi
Quote Reply
Re: Again long/short mod and relational mod In reply to
Have you tried logging on with a name other than "fischi" with a number attached? I'm just curious about what would happen if you had a userid "fred" and another one "wilma."


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





Quote Reply
Re: Again long/short mod and relational mod In reply to
Just edit anna and fred and nothing changed when using list all.

Besides, i found out that searching for userID Anna returns correct results from the item db.

Fischi
Quote Reply
Re: Again long/short mod and relational mod In reply to
Searches for "fred" and "anna" seem to be working fine. (I don't remember much of the German I learned more than 30 years ago, so I can't be sure. Smile )

So it seems the problem will only arise if you have userids where one is contained within another -- "fischi" and "fischi1" for example.

Basically, your "whole word" isn't working. And the "exact match" code you had before didn't work either.

Let me think about it a bit. I may have another idea, but I'm not sure.


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





Quote Reply
Re: Again long/short mod and relational mod In reply to
It's working. The following thread gave me the answer:

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002478.html

All I had to do is add the undef %in; before the $in{'USER'} = $rec{'USER'}; and all is workung fine now.

Fischi