Skip to main content
incorporated the content of a comment
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

The condition method does notcondition() doesn't take an array as argument.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one perreplace $query->condition(array('f.status', 1, '=', 'f.country_value', 'Afghanistan', '=')); with the following lines.

// The third argument isn't necessary as `=` is the dafault operator, in this case.
$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');

The query is using the value of the status field, without passing thembut that isn't added to the list of fields passed to $query->fields().
group is a reserved word in MySQL 5.5; it cannot be used as an array:identifier for a table field.

$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');

The condition method does not take an array.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one per field, without passing them as an array:

$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');

condition() doesn't take an array as argument.

You need to replace $query->condition(array('f.status', 1, '=', 'f.country_value', 'Afghanistan', '=')); with the following lines.

// The third argument isn't necessary as `=` is the dafault operator, in this case.
$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');

The query is using the value of the status field, but that isn't added to the list of fields passed to $query->fields().
group is a reserved word in MySQL 5.5; it cannot be used as identifier for a table field.

added 99 characters in body
Source Link
Kevin
  • 28k
  • 12
  • 95
  • 196

The condition method does not take an array.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one per field, without passing them as an array.:

$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');

The condition method does not take an array.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one per field, without passing them as an array.

The condition method does not take an array.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one per field, without passing them as an array:

$query->condition('f.status', 1);
$query->condition('f.country_value', 'Afghanistan');
Source Link
Kevin
  • 28k
  • 12
  • 95
  • 196

The condition method does not take an array.

https://api.drupal.org/api/drupal/includes%21database%21select.inc/function/SelectQuery%3A%3Acondition/7

You need to separate condition to two calls, one per field, without passing them as an array.