Hi,

I am an experienced php/MySQL developer, but I am new to drupal.

I'd like to render some dynamic data inside a 'page', by using php script.
The data I want to access is in another database (other than the DB for drupal) on the same server : another username/pw/database_name

How should I do that ?
I am worried that by changing the database connection to the database I need, I will break the connection that the site needs.

I am running Drupal 6.6

Comments

roobroup’s picture

sorry
found the answer myself in http://drupal.org/node/18429

bye

avadhutp’s picture

Don't worry. Establish a connection using pure PHP just like you'd do otherwise. And when you submit nodes, just use "PHP code" as the input filter. You can program stand alone PHP pages from within Drupal. Not an issue at all. If the tables are within the same schema as your Drupal tables, then you can use Drupal's database abstraction API.

So, again, don't worry about breaking connections. That ain't going to happen.