| 116 |
$extra_fields = count($fields_to_select) > 0 ? ', ' . implode(', ', $fields_to_select) : ''; |
$extra_fields = count($fields_to_select) > 0 ? ', ' . implode(', ', $fields_to_select) : ''; |
| 117 |
$extra_where = count($where_clauses) > 0 ? ' AND ' . implode(' AND ', $where_clauses) : ''; |
$extra_where = count($where_clauses) > 0 ? ' AND ' . implode(' AND ', $where_clauses) : ''; |
| 118 |
$sql = 'SELECT n.nid, n.title '. $extra_fields .' FROM {node} n '. implode(' ', $table_joins) ." WHERE n.status = 1 AND n.type = '$type'". $extra_where; |
$sql = 'SELECT n.nid, n.title '. $extra_fields .' FROM {node} n '. implode(' ', $table_joins) ." WHERE n.status = 1 AND n.type = '$type'". $extra_where; |
|
dprint_r($sql); |
|
| 119 |
// Build the columns. |
// Build the columns. |
| 120 |
$header[] = array('data' => t('title'), 'field' => 'n.title'); |
$header[] = array('data' => t('title'), 'field' => 'n.title'); |
| 121 |
foreach ($ctype->fields as $field) { |
foreach ($ctype->fields as $field) { |