[development] Crossing information between content types

Moshe Weitzman weitzman at tejasa.com
Thu Oct 25 00:00:56 UTC 2007


The CCK developera re always one step ahead. They have some helpful
functions for building joins that will work even if a field changes
its multiple status or you do an upgrade. Here is an example "safe"
join:

$field_bw = content_fields('field_blog_weight');
$db_info_bw = content_database_info($field_bw);

$sql = "SELECT n.nid, n.title FROM {node} n JOIN {".
$db_info_bw['table'] . '} bw ON n.vid=bw.vid';


More information about the development mailing list