I am attempting to use an alternate query for a view that exposes data entered via a cck type that uses the experimental multigroup module. The only way I have been able to get the view to work properly is to add a custom where clause.
The problem is that I have been using a preview SQL query to test the where clause. The SQL has the arguments "hard coded". For example: one of the views generated WHERE clauses looks something like: AND (term_data_1__term_data.name = 'product1').
Instead of "product1", I need to put a variable for $args[3]. Any idea on how to do this?
The first part of the code I am using to implement the alternate query, looks like:
drupal_set_message($view->name);
if($view->name=="no_help_comments") {
// drupal_set_message($this->build_info['query'][1]);
// drupal_set_message($view->build_info['query_args'][0]);
// drupal_set_message($view->build_info['query_args'][1]);
if($view->build_info['query_args'][1]==0) { // <Any> is the current choice, so, show everything
$view->build_info['query']="SELECT DISTINCT(node.nid) AS nid,Thanks for any suggestions