Hello,

First of all, I am working with Fedora Core 2.

I am making my first page with Drupal, and I used mysql. Until then, it was perfect, no problems neither in the installation nor in the page construction. But then my boss asked me to make external database consults. The other database was in PostgreSQL, but I know there's no poblem in using the both of them simultaneosly.

So I read the documentation (I basically followed http://drupal.org/node/18429), and I added to my settings.php this lines, below the mysql ones:

 $db_url['name'] = 'pgsql://username:password@localhost/database';

Where I filled username, password and database with my own.

I can acceed to the PostgreSQL database, and make selections on the database, so I think I have installed everything right. I did the migration of an old database I had in another PC, I think it works.

When I try to connect to this other database, I write this:

db_set_active('name');
db_query('SELECT * FROM database');
(...)
db_set_active('default');

But that simply doesn't work. It gives no Error Message at all, and no php errors, it just makes disappear the Drupal theme, and obviously doesn't make the SELECT.

Anyone can help me, please? I've been stuck here for weeks!

Thanks in advance :)

Lillian

Comments

lillian’s picture

Does anybody know already how to do it?

I'm really stucked!

ntozier’s picture

I know that this isn't very helpful, but I'm experiencing a very similar issue (running drupal 4.7.x)
I've noticed that according to the logs that its not even trying to connect to the correct database.
The error I'm getting is that the table doesn't exist. Are you seeing this same error?

---
ntoz

lillian’s picture

I just don't get any error :O