Gossamer Forum
Home : Products : DBMan : Customization :

Search-Relational Mod: In need of an expert...

Quote Reply
Search-Relational Mod: In need of an expert...
Given the trouble most people seem to have with the relational mod, I'm almost afraid to ask this question, but here goes...

I have the relational mod working. When calling a long record on the primary DB by Userid, I get the relevant short record listings from the secondary DB for the same Userid... no probs whatsoever.

I have made a couple small changes to primary.pl sub html_record to make this work... basically commenting out the nh and mh variables in $long_url (don't need 'em), and making sure a valid Userid is written to the primary short display if there is a partial match or list all. So far so good...

Code:
# $long_url = "$db_script_url?$long_url&nh=$record_number&mh=1";
$long_url =~ s/Userid=(\w+|\*)/Userid=$rec{'Userid'}/;
$long_url =~ s/Userid=&/Userid=$rec{'Userid'}&/;

The problem is that when I search the DB on any field other than Userid (the common field between the DBs), I either get NO short record listings from the secondary DB or ALL short record listings from the secondary DB.

Basically, if anyone has an relational implementation where they can successfully search on any field other than the common DB field, I would be most appreciative of pointers...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)

[This message has been edited by oldmoney (edited February 28, 2000).]
Quote Reply
Re: Search-Relational Mod: In need of an expert... In reply to
The challenge I see to do this, oldmoney, would be to put the "hits" from both databases into the hits array and then parse the data into a meaningful format between the two databases.

Logically speaking, the sub view_records routine would have to be re-written to include a combined array of the hits. Then the sub query routine would have to be re-written to parse data from both databases in a seamless manner...

Not easy to say the least...

Sorry for not being more helpful.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Search-Relational Mod: In need of an expert... In reply to
Yeah, I guess I don't fully understand what is going on behind the scenes (yet!). However, I was able to solve the problem by adding the following just before the normal &switch call in the long record...
Code:
if (length($in{'Userid'}) < 1) { $in{'Userid'} = $rec{'Userid'}; }
... even if I don't understand why just a plain $in{'Userid'} = $rec{'Userid'}; before the &switch call doesn't work! :X

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)