You are here

function _computing_query_records in Drupal Computing 7

This is an internal function to query records. It returns the query result object. Calling function is responsible to fetch array/object from it.

Parameters

array $conditions:

int $limit:

Return value

mixed

2 calls to _computing_query_records()
computing_create_record in ./computing.module
Creates a command record and save to {computing_record} queue. Duplicate command would not get saved twice. To force saving a duplicate command, set the 'updated' field or any input field with different value in $options.
computing_query_active_records in ./computing.module
Query active records. Record is active when status is NULL. This is different from control='REDY', which means the record is ready to be processed.

File

./computing.module, line 105

Code

function _computing_query_records($conditions = array(), $limit = 0) {
  $conditions = computing_validate_fields($conditions);
  $query = db_select('computing_record', 'c');
  $query
    ->fields('c');
  foreach ($conditions as $field => $value) {
    $query
      ->condition($field, $value);
  }
  if ($limit > 0) {
    $query
      ->range(0, $limit);
  }
  return $query
    ->execute();
}