Pulling data from MYSQL tables and populating a content type
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.
Thanks!
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!
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!
Cheers,
Chris