You are here

public static function SocialContent::getImportCount in Social Content 7.2

Utility static function to get a count number of imports for an instance.

Parameters

int $instance_id: The id of the instance to which to get the count for.

Return value

int Number of imports.

2 calls to SocialContent::getImportCount()
SocialContent::getAllInstances in ./social_content.class.inc
Utility static function to get all instances.
SocialContent::loadInstanceSettings in ./social_content.class.inc
Load instance settings for the current global.

File

./social_content.class.inc, line 990
Social Content class.

Class

SocialContent
TODO: Table names should be a property for ease of change Separate this class into smaller classes.

Code

public static function getImportCount($instance_id) {
  $query = db_select('social_content_history', 'history');
  $query
    ->addExpression('COUNT(*)');
  return $query
    ->condition('instance', $instance_id)
    ->execute()
    ->fetchField();
}