You are here

public static function InstapageCmsPluginDBModel::getResults in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/models/InstapageCmsPluginDBModel.php \InstapageCmsPluginDBModel::getResults()

Executes the query and returns a list of results.

Parameters

string $sql SQL to execute. %s can be used to output pre-formatted values. Values for %s can be passed as arguments for this function.:

Return value

mixed first row of results of the query.

File

core/models/InstapageCmsPluginDBModel.php, line 111

Class

InstapageCmsPluginDBModel
Class responsible for communication with DB.

Code

public static function getResults($sql) {
  $args = func_get_args();
  array_shift($args);
  if (isset($args[0]) && is_array($args[0])) {
    $args = $args[0];
  }
  return InstapageCmsPluginConnector::getSelectedConnector()
    ->getResults($sql, $args);
}