[support] changing field tables
Marty Landman
mlandman at face2interface.com
Fri Sep 16 01:43:24 UTC 2011
I just ran into a Drupal gotcha. Here's the situation. I coded db
queries for nodes and blocks using the hard-coded field file_path
which is part of the content-type story-image. My queries referenced
content_type_story_image.field_story_file_path_value and it was working fine.
However today I added a second content type, fairy-tale-image which
as one of its fields uses the existing field file_path. This caused
the file_path field to move into its own table,
content_field_file_path. Now I've changed the queries but am thinking
there must be a more intelligent way I could've done these queries,
like going through Drupal's api and not getting caught on this snag.
Can anyone point me in the right direction to learn how to do that?
Marty
--
http://drupal.org/project/personal_notes
https://addons.mozilla.org/af/firefox/addon/181910/
More information about the support
mailing list