You are here

protected function OAuthStoreMySQL::query_row_assoc in Lingotek Translation 7.4

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

* Perform a query, return the first row * *

Parameters

string sql: * @param vararg arguments (for sprintf) * @return array

Overrides OAuthStoreSQL::query_row_assoc

2 methods override OAuthStoreMySQL::query_row_assoc()
OAuthStoreAnymeta::query_row_assoc in lib/oauth-php/library/store/OAuthStoreAnyMeta.php
* Perform a query, return the first row * *
OAuthStoreMySQLi::query_row_assoc in lib/oauth-php/library/store/OAuthStoreMySQLi.php
* Perform a query, return the first row * *

File

lib/oauth-php/library/store/OAuthStoreMySQL.php, line 108

Class

OAuthStoreMySQL

Code

protected function query_row_assoc($sql) {
  $sql = $this
    ->sql_printf(func_get_args());
  if (!($res = mysql_query($sql, $this->conn))) {
    $this
      ->sql_errcheck($sql);
  }
  if ($row = mysql_fetch_assoc($res)) {
    $rs = $row;
  }
  else {
    $rs = false;
  }
  mysql_free_result($res);
  return $rs;
}