nodefamily_views_filter

Versions
5
nodefamily_views_filter($op, $filter, $filterinfo, &$query)

Code

contributions/nodefamily/nodefamily.module, line 1059

<?php
function nodefamily_views_filter($op, $filter, $filterinfo, &$query) {
  $query->ensure_table($filterinfo['table']);
  $query->add_where("%s.%s %s '%s'", $filterinfo['table'], $filterinfo['field'], $filter['operator'], $filter['value']);
  
  if ($filter['options']) {
    $table = ($filterinfo['table'] == 'nodefamily_child') ? 'nf_node_parent' : 'nf_node_child';
    $num = $query->add_table($table);
    $tablename = $query->get_table_name($table, $num);
    $query->add_where("%s.type = '%s'", $tablename, $filter['options']);
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.