You are here

public function InstapageCmsPluginWPConnector::getRow in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginWPConnector.php \InstapageCmsPluginWPConnector::getRow()

Executes the query and returns the first row.

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.

1 call to InstapageCmsPluginWPConnector::getRow()
InstapageCmsPluginWPConnector::areSEOFriendlyUrlsEnabled in core/connectors/InstapageCmsPluginWPConnector.php
Checks if SEO friendly urls are enabled @uses self::getSelectedConnector()

File

core/connectors/InstapageCmsPluginWPConnector.php, line 137

Class

InstapageCmsPluginWPConnector
Class that utilizes native WordPress functions to perform actions like remote requests and DB operations.

Code

public function getRow($sql) {
  global $wpdb;
  $args = func_get_args();
  array_shift($args);
  $sql = $this
    ->prepare($sql, $args);
  $result = $wpdb
    ->get_row($sql, 'OBJECT');
  $this
    ->checkLastQuery();
  return $result;
}