1

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?

4

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.

0

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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