You are here

protected function OAuthStorePostgreSQL::query_row in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_row()
  2. 7.2 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_row()
  3. 7.3 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_row()
  4. 7.4 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_row()
  5. 7.5 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_row()

Perform a query, return the first row

Parameters

string sql:

vararg arguments (for sprintf):

Return value

array

1 call to OAuthStorePostgreSQL::query_row()
OAuthStorePostgreSQL::checkServerNonce in lib/oauth-php/library/store/OAuthStorePostgreSQL.php
Check an nonce/timestamp combination. Clears any nonce combinations that are older than the one received.

File

lib/oauth-php/library/store/OAuthStorePostgreSQL.php, line 1831

Class

OAuthStorePostgreSQL

Code

protected function query_row($sql) {
  $sql = $this
    ->sql_printf(func_get_args());
  if (!($res = pg_query($this->conn, $sql))) {
    $this
      ->sql_errcheck($sql);
  }
  if ($row = pg_fetch_array($res)) {
    $rs = $row;
  }
  else {
    $rs = false;
  }
  pg_free_result($res);
  return $rs;
}