Pulling data from MYSQL tables and populating a content type

2 replies [Last post]
Last seen: 5 years 42 weeks ago
Joined: 2014-10-09

In general, are there any lessons on Build a Module that cover pulling data directly from the MYSQL tables and inserting them into a particular content type?

I have a need to gather submissions using a Webform, have editors review those submissions, and post the approved ones as Articles. Webform does not allow this but I assume custom programming would. The question is how would I go about pulling MYSQL data and inserting them into fields in an article content type? I've done about 60% of the BAM courses but don't recall seeing this come up.


Chris Shattuck
Last seen: 4 weeks 3 days ago
Joined: 2009-08-16
Great question. I don't think

Great question. I don't think we cover this specifically, but I might be able to point you in the right direction.

First, I'd be curious if Webform integrates with Rules and lets you trigger the creation of an article when a webform is submitted.

If not, then I'd check if there's a extension to the Feeds module that lets you target a particular table and cycle through rows and generate content based on that.

Finally, the Migrate module will likely give you the most flexibility and will let you map database fields to node fields, but it also has the steepest learning curve.

Hopefully that helps!


Last seen: 5 years 42 weeks ago
Joined: 2014-10-09
In fact, I'm starting to

In fact, I'm starting to learn Rules right now, trying to make Simplenews give a more complex selection process for assembling pieces of content into a newsletter. It's very powerful, well worth my effort.

Many thanks, Chris!

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:

Contact us

Below are the supported keyboard shortcuts for our video player.

Start / stop video
Go to next video
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
Jump to a percentage (2 is 20%, for example)
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
1 month
6 months
10% off
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.