Home : Products : DBMan : Customization :

Products: DBMan: Customization: Re: [Paul] Help with reading a file correctly: Edit Log

Here is the list of edits for this post
Re: [Paul] Help with reading a file correctly
Paul's code stops at the first match with a user, though the way the favs database is currently constructed is that each fav is stored as a separate record (bad idea imo).

The reason for adding the pipe delimeter after each record is to build a regex expression, such as 1|17|195|, and then chop the trailing delimeter. So these lines are needed:

Code:
$in{$db_key} .= "$1|";
chop $in{$db_key};

In Reply To:
How do you build the output once you've got the matching records?

The intent is to simply pass thru record IDs to DBMans query function and let it build its normal db views (long or short if that mod is installed).

In Reply To:
you could push $1 into an array to get all the ids, then use &get_record to build the output or build it straight away with %output = get_record($1);

That seems it could work, effectively creating a new "view" for your favs. Or you could take the lazy man's approach like I did, build your regex link, and redirect to that link, like so...

Code:
print "Location: $db_script_url?db=$in{db}&uid=$db_uid&$db_key=$in{$db_key}&re=1&ww=1&mh=8&view_records=Search\n\n";

Whole words gets picked up on the redirect, though I still don't know why it gets ignored when calling sub query directly. Oh well... Crazy

Last edited by:

oldmoney: May 16, 2002, 11:02 AM

Edit Log: