2

I have a installation of plain Drupal 6 with its own database. I have also another database, different from the one used by Drupal.

I want to connect this database (with its own structure, tables and relations) with the database used by Drupal, and use the information in that database for creating views, for example.

I have a table "Persons" with 2 fields (Name, and Age) in the external database. I want to transfer (or connect, or synchronize) that information to my database in Drupal, or handle this information with some module. In my Drupal site, I have a "Persona" content type with two CCK fields: Name, and Age.

Is there any existing solution?

1 Answer 1

4

Easy answer: use the data module for drupal 6.x

http://drupal.org/project/data

"Data module helps you model, manage and query related sets of tables. It offers an administration interface and a low level API for manipulating tables and accessing their contents. Data module provides Views integration for displaying table data and Drupal search integration for searching table content."

The included data_ui module will let you setup the connections to your external database and map the fields.

6
  • i activate data_ui module and only i get that create a new table (admin/build/data) in the database of my drupal and extract the information of this table. ¿Where i setup my connection with my external database? Feb 6, 2012 at 21:57
  • because i want to extract the information of my external database and put this in my drupal and administrate this Feb 6, 2012 at 22:13
  • You want to add the connection to your external database in your settings file (see drupal.org/node/18429). When you loaded data_ui module, you also loaded schema which will recognize that the additional database doesn't match your existing drupal install and have these tables listed in the 'orphaned' tables section ready for adoption under the 'adopt tables' tab.
    – schnippy
    Feb 6, 2012 at 23:17
  • thnks a lot!.. But i find a ¿bug? in schema module because the mysql type date don't recognize... exist any patch for this bug? Feb 7, 2012 at 15:03
  • not sure how to resolve that but there is a big thread (multiple threads actually) on schema and missing mysql date field on d.o: drupal.org/node/200953
    – schnippy
    Feb 7, 2012 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.