I'm an experienced web developer, but I'm new to Drupal.

I have an existing MySQL database and I would like to build a website around it, with one page for each record in the main table. That would mean a few thousand pages for the site right from the start.

Are there any good tutorials that explain how to do this in Drupal?

share|improve this question

3 Answers

up vote 3 down vote accepted

It's not too hard. Assuming Drupal 7 and a one-time import:

  1. Create a new content type in Drupal with the fields you want
  2. Export a CSV file of your records with a header row from your legacy database with the fields you want.
  3. Use Feeds to import the csv file. You will setup a mapping between the csv fields and your content types fields (from within the Drupal UI). This is pretty straightforward and the feeds module guides you through it.
  4. Feeds will create one node per record (line) in your csv file.

Now if you will continue to use your existing database and want to import new records as they are added, I believe Feeds has some support for this but I haven't personally used it.

share|improve this answer

You might find the Feeds Module useful. Here is the link to the tutorials.

share|improve this answer

Another approach is to wrap views around your table(s). You can have a look at the maillog module for an example. The module integrates its maillogs with views.

Once you have the integration, views gives you a very powerfull query and report generator.

share|improve this answer

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

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