Gossamer Forum
Home : Gossamer Threads Inc. : Custom Modification Jobs :

dbman mod: get records and query results from other database

Quote Reply
dbman mod: get records and query results from other database
I have tried to code this myself, but can't get it to work and am not willing to invest any more of my time, so I thought I'd invest some money instead :-)

There's actually two mods I need, both of which I already started thinking through, and both of which involve changing from one database setup to another for searching and printing out results (printing = on screen). Authentication is not an issue, as all database setups I have share the same authentication routines.

1) I need dbman to be capable to retrieve individual fields from a database other than the one one is logged in, and I need this to work in html_record.

Example: User name is stored in user.db, user's publications are stored in publ.db. In every search result from publ, I would like to retrieve the user's first name from user.db. Essentially, this involves calling sub query for user.db from within sub html_record for publ.db, but somehow this just doesn't work.

2) I want to write the results of database queries to static pages.
I have a database of static pages, pages.db, which contains the filename, say file.html. The field to be printed as "content" to file.html is generally empty. With non-query-generated pages, "content" is retrieved from file.html itself, where it is contained in "<div class="content"></div>" tags.

For query-generated pages, the field "content" in pages.db stores the query string, like
http://someserver.com/cgi-bin/dbman/db.cgi?db=bibl&uid=default&ID=*&view_records=1

Now, whenever another of my databases, say publ.db, is modified, dbman should do the following:
- open pages.db and check whether the string "db=publ" is contained in the field "content".
- for each page where that's the case: rewrite the file using the values from the query-string stored in "content".

All I need to do is to get the actual content, i.e. the query.
This involves doing the query and coding the results, using html_record from that *other* database. So here again, a change of database setup values is required. The actual writing to file I have already taken care of.

(I should perhaps add that my dbman files have been quite heavily edited already!)

Hopefully someone will find this an interesting task ...







kellner
Subject Author Views Date
Thread dbman mod: get records and query results from other database kellner 9279 Nov 11, 2001, 3:24 AM
Thread Re: [kellner] dbman mod: get records and query results from other database
looping 9117 Nov 12, 2001, 3:14 PM
Thread Re: [looping] dbman mod: get records and query results from other database
kellner 9097 Nov 12, 2001, 3:48 PM
Thread Re: [kellner] dbman mod: get records and query results from other database
looping 9082 Nov 12, 2001, 4:32 PM
Post Re: [looping] dbman mod: get records and query results from other database
Watts 8996 Nov 13, 2001, 2:58 PM
Thread Re: [looping] dbman mod: get records and query results from other database
kellner 9014 Dec 17, 2001, 9:54 AM
Thread Re: [kellner] dbman mod: get records and query results from other database
looping 8941 Dec 17, 2001, 5:26 PM
Thread Re: [looping] dbman mod: get records and query results from other database
kellner 8978 Dec 18, 2001, 3:56 AM
Thread Re: [kellner] dbman mod: get records and query results from other database
Paul 8996 Dec 18, 2001, 4:02 AM
Thread Re: [PaulW] dbman mod: get records and query results from other database
kellner 8963 Dec 18, 2001, 4:19 AM
Thread Re: [kellner] dbman mod: get records and query results from other database
Paul 8947 Dec 18, 2001, 4:56 AM
Thread Re: [PaulW] dbman mod: get records and query results from other database
kellner 8943 Dec 18, 2001, 6:15 AM
Thread Re: [kellner] dbman mod: get records and query results from other database
looping 8913 Dec 18, 2001, 10:47 AM
Post Re: [looping] dbman mod: get records and query results from other database
kellner 8880 Dec 18, 2001, 2:15 PM