protected function OAuthStoreMySQLi::query_one in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::query_one()
- 7.2 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::query_one()
- 7.3 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::query_one()
- 7.4 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::query_one()
- 7.6 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::query_one()
* Perform a query, return the first column of the first row * *
Parameters
string sql: * @param vararg arguments (for sprintf) * @return mixed
Overrides OAuthStoreMySQL::query_one
File
- lib/
oauth-php/ library/ store/ OAuthStoreMySQLi.php, line 216
Class
Code
protected function query_one($sql) {
$sql = $this
->sql_printf(func_get_args());
if (!($res = mysqli_query($this->conn, $sql))) {
$this
->sql_errcheck($sql);
}
if ($row = mysqli_fetch_assoc($res)) {
$val = array_pop($row);
}
else {
$val = false;
}
mysqli_free_result($res) || is_object($res) && get_class($res) == "mysqli_result" ? true : false;
return $val;
}