Re: [Catalyst] One App, multiple databases

2008-11-20 Thread Tomas Doran
On 20 Nov 2008, at 14:51, Jose Luis Martinez wrote: Jonathan Rockway escribió: * On Wed, Nov 19 2008, Jose Luis Martinez wrote: sub ACCEPT_CONTEXT { my ($self, $c) = @_; my $user_db = $c->lookup_the_users_db(); $self->{'dsn'} =~ s/#DATABASE#/$user_db/; return $self; } I am

Re: [Catalyst] One App, multiple databases

2008-11-20 Thread Jose Luis Martinez
Jonathan Rockway escribió: * On Wed, Nov 19 2008, Jose Luis Martinez wrote: sub ACCEPT_CONTEXT { my ($self, $c) = @_; my $user_db = $c->lookup_the_users_db(); $self->{'dsn'} =~ s/#DATABASE#/$user_db/; return $self; } I am really surprised that this works at all. When do you

Re: [Catalyst] One App, multiple databases

2008-11-20 Thread Jonathan Rockway
* On Wed, Nov 19 2008, Jose Luis Martinez wrote: > > sub ACCEPT_CONTEXT { > my ($self, $c) = @_; > > my $user_db = $c->lookup_the_users_db(); > $self->{'dsn'} =~ s/#DATABASE#/$user_db/; > > return $self; > } > I am really surprised that this works at all. When do you actually ever

Re: [Catalyst] One App, multiple databases

2008-11-19 Thread Chris Carline
On Wed, Nov 19, 2008 at 10:53 PM, Jose Luis Martinez <[EMAIL PROTECTED]> wrote: > Basically we giving multi-tentant capability to our app (which was ported > from some old CGIs). The CGIs where setup to load config files based on the > REMOTE_USER, so we gave each user a separate DB just by changin

Re: [Catalyst] One App, multiple databases

2008-11-19 Thread Jose Luis Martinez
Mesdaq, Ali escribió: Are these db's exact copies as far as schema from each other? Or is it different tables and structure as well? Reason I am asking is because if its exactly the same and all your queries work the same and your logic works the same as well and the only difference is if use

RE: [Catalyst] One App, multiple databases

2008-11-19 Thread Mesdaq, Ali
[mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2008 9:54 AM To: The elegant MVC web framework Subject: [Catalyst] One App, multiple databases Hello, This question has been asked a couple of times on the list, and I have found yet another solution to it, but I would like to hear if maybe I&

[Catalyst] One App, multiple databases

2008-11-19 Thread Jose Luis Martinez
Hello, This question has been asked a couple of times on the list, and I have found yet another solution to it, but I would like to hear if maybe I'm doing something wrong, or I will suffer serious pain by doing it my way :) We have an app that will connect to one database or another dependin