protected function OAuthStorePostgreSQL::query_one in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.2 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_one()
- 7.3 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_one()
- 7.4 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_one()
- 7.5 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_one()
- 7.6 lib/oauth-php/library/store/OAuthStorePostgreSQL.php \OAuthStorePostgreSQL::query_one()
Perform a query, return the first column of the first row
Parameters
string sql:
vararg arguments (for sprintf):
Return value
mixed
8 calls to OAuthStorePostgreSQL::query_one()
- OAuthStorePostgreSQL::addConsumerRequestToken in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Add an unautorized request token to our server.
- OAuthStorePostgreSQL::addServerToken in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Add a request token we obtained from a server.
- OAuthStorePostgreSQL::countConsumerAccessTokens in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Count the consumer access tokens for the given consumer.
- OAuthStorePostgreSQL::countServerTokens in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Count how many tokens we have for the given server
- OAuthStorePostgreSQL::exchangeConsumerRequestForAccessToken in lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php - Exchange an authorized request token for new access token.
File
- lib/
oauth-php/ library/ store/ OAuthStorePostgreSQL.php, line 1859
Class
Code
protected function query_one($sql) {
$sql = $this
->sql_printf(func_get_args());
if (!($res = pg_query($this->conn, $sql))) {
$this
->sql_errcheck($sql);
}
$val = pg_fetch_row($res);
if ($val && isset($val[0])) {
$val = $val[0];
}
pg_free_result($res);
return $val;
}