Gossamer Forum
Home : Products : DBMan : Customization :

Multiple db and View All

Quote Reply
Multiple db and View All
Hope someone has an idea on how to resolve my multiple db problem Crazy I have scanned the forum as well as the FAQ sites and really haven't found a simple answer.

Here is the scenario:

I have two databases set up for a DJ Booking system that I have created: Users and Booking

The idea is that those who want to submit booking requests have to first signup and then they can submit a booking inquiry to the system. To save time I didn't want to set up a relational database. Instead I set up one database that the user signs up on and is forced to add their account information to the users.db and another that they will receive a link to submit a booking inquiry to the booking db.

Each has their own db, count, log, html, cgi and cfg files. The only thing they share is auth and pass. And I have changed the links in each of the html files to correspond with the different databases.

It seems that everything is working fine until I log in as the admin. Then if I try to view all I have problems:
If I am in the users.db admin and click on the view all link for booking.db or
If I am in the booking.db application and click on the view all link for users
I am given the search for with "no search terms specified" and it does not display the list of records.

I noticed in my search for an answer that the db_key is mentioned. Is this the way to resolve the issue? If so, is there someone out there who knows the answer?

Thanks in advance Smile
Cher
Quote Reply
Re: [chronisca] Multiple db and View All In reply to
It's hard to guess without seeing your database or your files to know what's happening.

Do you have a userid field defined in both databases?
If so, in your .cfg file is the line:

$auth_user_field = 1;

set to the correct field?

Can you provide an example of the view all links you are using.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Multiple db and View All In reply to
I have a thought. If the userid is set to two different numbers (for instance it is position 1 in the first database but position 2 in the other) could this have an effect? I am thinking logically it might.

Here is a portion of the list in the cfgs files:

For the booking requests:
'userid' => [ 0, 'alpha', -1, 255, 0, '', ''],
'id' => [ 1, 'numer', -1, 255, 1, '', ''],
'dateofrequest' => [ 2, 'date', 20, 255, 1, &get_date(), ''],

For the user accounts:
'ID' => [ 0, 'numer', -1, 255, 1, '', ''],
'userid' => [ 1, 'alpha', 3, 15, 1, '', ''],
'firstname' => [ 2, 'alpha', 20, 255, 1, '', ''],
'lastname' => [ 3, 'alpha', 20, 255, 1, '', ''],
Cher

Last edited by:

chronisca: Jul 31, 2002, 9:32 AM
Quote Reply
Re: [chronisca] Multiple db and View All In reply to
It shouldn't matter what field position the userid is in.

I did notice you have -1 set for the ID field. The -1 only works if you are using auto generate. Try change it to the example below and see if that makes a difference.

ID' => [ 0,'numer',5,25,1,'',''],

I think you should consider using the relational mod. JPDeni has an example which is downloadable from her site.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/