[support] using two different database type
Ámon Tamás
amont at 5net.hu
Wed Jul 30 14:00:46 UTC 2008
Earnie Boyd írta:
> Quoting Ámon Tamás <amont at 5net.hu>:
>
>
>> Hello,
>>
>> I like to use two database, a postgresql and a mysqli in my module. My
>> settings.php looks like this:
>>
>> $db_url['default'] = 'mysqli://user:pass@localhost:3370/allathletics';
>> $db_url['atleta'] = 'pgsql://user:pass@192.168.2.104/cds_atletabackup';
>>
>> But when I try the
>>
>> db_set_active('atleta');
>>
>> I get the
>>
>> Fatal error: Cannot redeclare db_status_report() (previously declared in
>> /var/www/mysite/includes/database.mysqli.inc:23) in
>> /var/www/demo.internetstudio.hu/allathletics/web/includes/database.pgsql.inc
>> on line 33
>>
>> Is there a solution for it, or I must to use two same database type?
>>
>>
>
> The only solution is to hack core. Create a definition of
> db_status_report in database.inc will will in turn call one of
> db_status_report_mysqli() or db_status_report_pgsql() dependent on the
> active database type. You change the name of the db_status_report
> function in each of the database.mysqli.inc and database.pgsql.inc
> files accordingly.
>
>
I thinked about a same solution. Maybe this should be in the next
version in drupal...
It is a drupal 6. Maybe somebody has a patch for it?
Ámon Tamás
Sitefejlesztő és programozó
--
5NET Informatikai Kft.
1062 Budapest, Aradi utca 38. A 3/11
telefon: (1) 461-0205 | fax: (1) 461-0206
e-mail: amont at 5net.hu | web: http://www.5net.hu
More information about the support
mailing list